From b74b2619779b1deb903b7766261807df1e9b1f7f Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 7 Feb 2017 22:12:47 +0000 Subject: libbb: let bb_make_directory accept backslashes in path --- libbb/make_directory.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libbb/make_directory.c b/libbb/make_directory.c index 840c525b0..3e171ff02 100644 --- a/libbb/make_directory.c +++ b/libbb/make_directory.c @@ -51,6 +51,14 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags) } org_mask = cur_mask = (mode_t)-1L; +#if ENABLE_PLATFORM_MINGW32 + /* normalise path separators, path is already assumed writable */ + for (s=path; *s; ++s) { + if (*s == '\\') { + *s = '/'; + } + } +#endif s = path; while (1) { c = '\0'; -- cgit v1.2.3-55-g6feb