aboutsummaryrefslogtreecommitdiff
path: root/sftsr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftsr.c')
-rw-r--r--sftsr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sftsr.c b/sftsr.c
index 6db709e..9222c87 100644
--- a/sftsr.c
+++ b/sftsr.c
@@ -1089,11 +1089,13 @@ static vboxerr find_next_from_vbox(unsigned openfile, char __far *path)
// Now convert the filename
+#if USE_LFN_TO_SHORT
// Calculate hash now using host file name before any conversion
if (data.drives[drive].opt.generate_sfn) {
hash = lfn_name_hash(shfldirinfo.dirinfo.name.ach, shfldirinfo.dirinfo.name.u16Length,
data.drives[drive].opt.hash_chars);
}
+#endif
if (data.drives[drive].opt.use_host_sfn && shfldirinfo.dirinfo.cucShortName != 0) {
// Use shortname provided by host OS
@@ -1121,12 +1123,14 @@ static vboxerr find_next_from_vbox(unsigned openfile, char __far *path)
dputs("detected invalid characters in filename");
}
+#if USE_LFN_TO_SHORT
if (data.drives[drive].opt.generate_sfn && !valid) {
dputs("using mangled long filename");
mangle_to_8_3_filename(hash, data.drives[drive].opt.hash_chars,
found_file->filename, &shfldirinfo.dirinfo.name);
valid = true;
}
+#endif
if (!valid) {
dputs("hiding file with invalid filename");