From 5898f13480921e1c1ab362852f88794ea955ffce Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 29 Nov 2026 18:53:52 +0100 Subject: vbsf: add ability to build without hashing of long filenames --- sftsr.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sftsr.c') 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"); -- cgit v1.2.3