diff options
Diffstat (limited to 'libbb/concat_path_file.c')
-rw-r--r-- | libbb/concat_path_file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbb/concat_path_file.c b/libbb/concat_path_file.c index 5b4b7f113..81c7481ca 100644 --- a/libbb/concat_path_file.c +++ b/libbb/concat_path_file.c | |||
@@ -21,8 +21,14 @@ char* FAST_FUNC concat_path_file(const char *path, const char *filename) | |||
21 | 21 | ||
22 | if (!path) | 22 | if (!path) |
23 | path = ""; | 23 | path = ""; |
24 | #if ENABLE_PLATFORM_MINGW32 | ||
25 | lc = last_char_is(path, '/') ?: last_char_is(path, '\\'); | ||
26 | while (*filename == '/' || *filename == '\\') | ||
27 | filename++; | ||
28 | #else | ||
24 | lc = last_char_is(path, '/'); | 29 | lc = last_char_is(path, '/'); |
25 | while (*filename == '/') | 30 | while (*filename == '/') |
26 | filename++; | 31 | filename++; |
32 | #endif | ||
27 | return xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename); | 33 | return xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename); |
28 | } | 34 | } |