aboutsummaryrefslogtreecommitdiff
path: root/sftsr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftsr.c')
-rw-r--r--sftsr.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sftsr.c b/sftsr.c
index 9222c87..1387933 100644
--- a/sftsr.c
+++ b/sftsr.c
@@ -682,7 +682,6 @@ static void handle_write(union INTPACK __far *r)
// Special case: If size is 0, truncate to current file position
if (!bytes) {
-
err = vbox_shfl_set_file_size(&data.vb, data.hgcm_client_id,
data.files[openfile].root, data.files[openfile].handle,
sft->f_pos);
@@ -695,7 +694,7 @@ static void handle_write(union INTPACK __far *r)
return;
}
-
+
err = vbox_shfl_write(&data.vb, data.hgcm_client_id,
data.files[openfile].root, data.files[openfile].handle,
offset, &bytes, buffer);
@@ -1011,7 +1010,8 @@ static vboxerr find_volume_label(SHFLROOT root)
return 0;
}
-/** Gets and fills in the next directory entry from VirtualBox. */
+/** Gets and fills in the next directory entry from VirtualBox.
+ * @param path DOS path to search in + wildcards (only necessary in first call) */
static vboxerr find_next_from_vbox(unsigned openfile, char __far *path)
{
DOSSDB __far *sdb = &data.dossda->sdb;
@@ -1040,8 +1040,10 @@ static vboxerr find_next_from_vbox(unsigned openfile, char __far *path)
}
} else {
drive = sdb->drive & DOS_SDB_DRIVE_MASK;
- // For find next calls, it's not really important what we pass here.
- shflstring_clear(&shflstr.shflstr);
+ // For find next calls, it's not really important what we pass here,
+ // as long as we pass _something_.
+ // (otherwise, if empty, VirtualBox falls back to unfiltered search)
+ shflstring_strcpy(&shflstr.shflstr, " ");
}
@@ -1099,8 +1101,8 @@ static vboxerr find_next_from_vbox(unsigned openfile, char __far *path)
if (data.drives[drive].opt.use_host_sfn && shfldirinfo.dirinfo.cucShortName != 0) {
// Use shortname provided by host OS
- valid = utf16_to_local( &data, &shfldirinfo.dirinfo.name.ach, &shfldirinfo.dirinfo.uszShortName, shfldirinfo.dirinfo.cucShortName);
-
+ valid = utf16_to_local(&data, &shfldirinfo.dirinfo.name.ach, &shfldirinfo.dirinfo.uszShortName, shfldirinfo.dirinfo.cucShortName);
+
if (!valid) {
// Should not happen as Windows short names are pure ascii
dputs("hiding file with illegal character(s)");
@@ -1194,7 +1196,7 @@ static void handle_find_first(union INTPACK __far *r)
dputs("search volid OK");
clear_dos_err(r);
return;
- }
+ }
// First, open the desired directory for searching
openfile = find_free_openfile();