From b57536db8dd08d7dc17a6aa3042755408a6a5464 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 7 Apr 2024 16:46:02 -0400 Subject: [PATCH] [BugFix] Hosted incoming directory component leading slashes #2 Fix the rest.. Change-Id: Ie551772a073cba3eb6de176cd73a59d419057183 --- firmware/target/hosted/filesystem-app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/target/hosted/filesystem-app.c b/firmware/target/hosted/filesystem-app.c index 5b291154fa..7d59a174dc 100644 --- a/firmware/target/hosted/filesystem-app.c +++ b/firmware/target/hosted/filesystem-app.c @@ -168,7 +168,7 @@ static const char* _get_user_file_path(const char *path, const char *pos = path; /* replace ROCKBOX_DIR in path with $HOME/.config/rockbox.org */ pos += ROCKBOX_DIR_LEN; - if (*pos == '/') pos += 1; + while (*pos == PATH_SEPCH) pos++; #if (CONFIG_PLATFORM & PLATFORM_ANDROID) if (path_append(buf, "/sdcard/rockbox", pos, bufsize) >= bufsize)