aboutsummaryrefslogtreecommitdiff
path: root/sftsr.c
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-30 18:18:09 +0200
committerJavier <dev.git@javispedro.com>2022-04-30 18:18:09 +0200
commit9595ebb6348544a2945470a5f271de7b58549bcd (patch)
tree994431752c4a64ff2da3b9068af71cbda8f8440e /sftsr.c
parentff69feb4cacb191a278395c08490b3f97e280ad6 (diff)
downloadvbados-9595ebb6348544a2945470a5f271de7b58549bcd.tar.gz
vbados-9595ebb6348544a2945470a5f271de7b58549bcd.zip
another hack to avoid dir fd leaking
Diffstat (limited to 'sftsr.c')
-rw-r--r--sftsr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sftsr.c b/sftsr.c
index fb41431..4e47109 100644
--- a/sftsr.c
+++ b/sftsr.c
@@ -1043,6 +1043,15 @@ static vboxerr find_next_from_vbox(unsigned openfile, const char __far *path)
copy_drive_relative_filename(&shflstr.shflstr, path);
translate_filename_to_host(&shflstr.shflstr);
fix_wildcards(&shflstr.shflstr);
+
+ dlog_print("fixed path=");
+ dlog_print(shflstr.buf);
+ dlog_endline();
+
+ if (shflstr.shflstr.ach[shflstr.shflstr.u16Length-1] == '\\') {
+ // No wildcard?
+ return VERR_NO_MORE_FILES;
+ }
} else {
// For find next calls, it's not really important what we pass here,
// as long as it's not empty.