aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-05-06 21:28:29 +0200
committerJavier <dev.git@javispedro.com>2022-05-06 21:28:29 +0200
commit83ad31a104384e8a2535d32e2405de03b04fc5f8 (patch)
treee10f8a52464b9c193d8703df00d73a6d7e96ac26
parent7cea7762b67d5b4a8893143dddce1c1707c47b91 (diff)
downloadvbados-83ad31a104384e8a2535d32e2405de03b04fc5f8.tar.gz
vbados-83ad31a104384e8a2535d32e2405de03b04fc5f8.zip
no close needed for chdir/getattr which are lookups
-rw-r--r--sftsr.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sftsr.c b/sftsr.c
index cfab025..b48a42d 100644
--- a/sftsr.c
+++ b/sftsr.c
@@ -880,7 +880,6 @@ static void handle_getattr(union INTPACK __far *r)
}
map_shfl_info_to_getattr(r, &parms.create.Info);
- (void)vbox_shfl_close(&data.vb, data.hgcm_client_id, root, parms.create.Handle);
clear_dos_err(r);
}
@@ -1222,13 +1221,10 @@ static void handle_chdir(union INTPACK __far *r)
// Also check whether it is really a directory
if (!(map_shfl_attr_to_dosattr(&parms.create.Info.Attr) & _A_SUBDIR)) {
set_dos_err(r, DOS_ERROR_PATH_NOT_FOUND);
- goto chdir_close;
+ return;
}
clear_dos_err(r);
-
-chdir_close:
- (void)vbox_shfl_close(&data.vb, data.hgcm_client_id, root, parms.create.Handle);
}
static void handle_mkdir(union INTPACK __far *r)
@@ -1266,7 +1262,9 @@ static void handle_mkdir(union INTPACK __far *r)
break;
}
- (void)vbox_shfl_close(&data.vb, data.hgcm_client_id, root, parms.create.Handle);
+ // Immediately close newly created directory
+ vbox_shfl_close(&data.vb, data.hgcm_client_id, root, parms.create.Handle);
+
clear_dos_err(r);
}