diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/hosted/filesystem-app.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/target/hosted/filesystem-app.c b/firmware/target/hosted/filesystem-app.c index b36f04a0fe..5b291154fa 100644 --- a/firmware/target/hosted/filesystem-app.c +++ b/firmware/target/hosted/filesystem-app.c | |||
@@ -210,7 +210,7 @@ const char * handle_special_dirs(const char *dir, unsigned flags, | |||
210 | if (!strncmp(HOME_DIR, dir, HOME_DIR_LEN)) | 210 | if (!strncmp(HOME_DIR, dir, HOME_DIR_LEN)) |
211 | { | 211 | { |
212 | const char *p = dir + HOME_DIR_LEN; | 212 | const char *p = dir + HOME_DIR_LEN; |
213 | while (*p == '/') p++; | 213 | while (*p == PATH_SEPCH) p++; /* strip leading slashes */ |
214 | path_append(buf, rbhome, p, bufsize); | 214 | path_append(buf, rbhome, p, bufsize); |
215 | dir = buf; | 215 | dir = buf; |
216 | } | 216 | } |
@@ -232,6 +232,7 @@ const char * handle_special_dirs(const char *dir, unsigned flags, | |||
232 | #endif | 232 | #endif |
233 | ) | 233 | ) |
234 | { | 234 | { |
235 | while (*dir == PATH_SEPCH) dir++; /* strip leading slashes */ | ||
235 | path_append(buf, PIVOT_ROOT, dir, bufsize); | 236 | path_append(buf, PIVOT_ROOT, dir, bufsize); |
236 | dir = buf; | 237 | dir = buf; |
237 | } | 238 | } |