aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Casino <mail@eduardocasino.es>2022-06-11 01:53:49 +0200
committerJavier <dev.git@javispedro.com>2022-06-12 17:54:07 +0200
commitcffa3982921fb68aa2cb3beb3c2cbe82359c0d2c (patch)
tree2f12052b5f8e830d82fb5b1b1ce7746f1b49a25c
parent09af091384c09aa036b50d912596a95fb07c5c4c (diff)
downloadvbados-cffa3982921fb68aa2cb3beb3c2cbe82359c0d2c.tar.gz
vbados-cffa3982921fb68aa2cb3beb3c2cbe82359c0d2c.zip
Fix mount when folder names contain utf8 chars
-rw-r--r--sfmain.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sfmain.c b/sfmain.c
index a1a9518..5b69eb2 100644
--- a/sfmain.c
+++ b/sfmain.c
@@ -690,6 +690,7 @@ int main(int argc, const char *argv[])
{
LPTSRDATA data = get_tsr_data(true);
int err, argi = 1;
+ SHFLSTRING_WITH_BUF(utf8name, SHFL_MAX_LEN);
if (argi >= argc || stricmp(argv[argi], "install") == 0) {
uint8_t hash_chars = DEF_HASH_CHARS;
@@ -767,7 +768,8 @@ int main(int argc, const char *argv[])
drive = get_drive_letter(argv[argi]);
if (!drive) return invalid_arg(argv[argi]);
- return mount(data, folder, drive);
+ local_to_utf8(data, utf8name.buf, folder, utf8name.shflstr.u16Size);
+ return mount(data, utf8name.buf, drive);
} else if (stricmp(argv[argi], "umount") == 0 || stricmp(argv[argi], "unmount") == 0) {
char drive;
if (!data) return driver_not_found();