aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Casino <mail@eduardocasino.es>2022-05-05 21:12:26 +0200
committerJavier <dev.git@javispedro.com>2022-05-06 21:12:01 +0200
commit7cea7762b67d5b4a8893143dddce1c1707c47b91 (patch)
treee3a2cf3dab0fc3325dfd2ebcfe1a5c5ef07f6067
parentd5761078555e89534a35ca745c1bd50d4f3bc86e (diff)
downloadvbados-7cea7762b67d5b4a8893143dddce1c1707c47b91.tar.gz
vbados-7cea7762b67d5b4a8893143dddce1c1707c47b91.zip
Fix mkdir, chdir, getattr and setattr
-rw-r--r--sftsr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sftsr.c b/sftsr.c
index c510aae..cfab025 100644
--- a/sftsr.c
+++ b/sftsr.c
@@ -880,6 +880,7 @@ 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);
}
@@ -888,7 +889,7 @@ static void handle_setattr(union INTPACK __far *r)
// TODO: Just silently ignoring setattr,
// since the only attribute we could try to set in a multiplatform way
// is A_RDONLY by messing with UNIX perms.
- clear_dos_err(&r);
+ clear_dos_err(r);
}
/** Opens directory corresponding to file in path (i.e. we use the dirname),
@@ -1221,10 +1222,13 @@ 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);
- return;
+ goto chdir_close;
}
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)
@@ -1262,6 +1266,7 @@ static void handle_mkdir(union INTPACK __far *r)
break;
}
+ (void)vbox_shfl_close(&data.vb, data.hgcm_client_id, root, parms.create.Handle);
clear_dos_err(r);
}