diff options
author | Eduardo Casino <mail@eduardocasino.es> | 2022-05-24 21:49:53 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-06-12 17:13:03 +0200 |
commit | 4f5b72cf50855f4c75c8cc8a5ed34f53a11bfa7d (patch) | |
tree | 7febf7b1cffe8b7831d0bbdafaeb3b52e53bc6b4 | |
parent | 80f0debf2032e16629cb13682b8fb9ceccde423c (diff) | |
download | vbados-4f5b72cf50855f4c75c8cc8a5ed34f53a11bfa7d.tar.gz vbados-4f5b72cf50855f4c75c8cc8a5ed34f53a11bfa7d.zip |
Do not uppercase volume names
-rw-r--r-- | lfn.h | 4 | ||||
-rw-r--r-- | sftsr.c | 12 |
2 files changed, 9 insertions, 7 deletions
@@ -33,7 +33,7 @@ #ifdef __IN_SFTSR__ -static inline bool translate_filename_from_host(SHFLSTRING *, bool); +static inline bool translate_filename_from_host(SHFLSTRING *, bool, bool); static bool matches_8_3_wildcard(const char __far *, const char __far *); static int my_strrchr(const char __far *, char); @@ -325,7 +325,7 @@ static inline char *find_real_name( } d = _fstrcpy_local(dest, &shfldirinfo.dirinfo.name.ach); - translate_filename_from_host(&shfldirinfo.dirinfo.name, false); + translate_filename_from_host(&shfldirinfo.dirinfo.name, false, true); mangle_to_8_3_filename(hash, fcb_name, &shfldirinfo.dirinfo.name); if (match_to_8_3_filename(filename, fcb_name)) @@ -235,12 +235,14 @@ static int my_strrchr(const char __far *str, char c) return last; } -static inline bool translate_filename_from_host(SHFLSTRING *str, bool case_insensitive) +static inline bool translate_filename_from_host(SHFLSTRING *str, bool case_insensitive, bool uppercase) { bool valid = utf8_to_local(&data, str->ach, str->ach, &str->u16Length); - valid = (nls_uppercase(str) || case_insensitive) && valid; - + if (uppercase) + { + valid = (nls_uppercase(str) || case_insensitive) && valid; + } return valid; } @@ -996,7 +998,7 @@ static vboxerr find_volume_label(SHFLROOT root) err = vbox_shfl_query_map_name(&data.vb, data.hgcm_client_id, root, &shflstr.shflstr); if (err) return err; - (void) translate_filename_from_host(&shflstr.shflstr, false); + (void) translate_filename_from_host(&shflstr.shflstr, false, false); dprintf("label: %s\n", shflstr.buf); @@ -1101,7 +1103,7 @@ static vboxerr find_next_from_vbox(unsigned openfile, char __far *path) dprintf(" Host short filename: '%s'\n", shfldirinfo.dirinfo.name.ach); } else { - valid = translate_filename_from_host(&shfldirinfo.dirinfo.name, data.drives[drive].case_insensitive); + valid = translate_filename_from_host(&shfldirinfo.dirinfo.name, data.drives[drive].case_insensitive, true); } if (valid) { |