aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-02-07 22:12:47 +0000
committerRon Yorston <rmy@pobox.com>2017-02-07 22:12:47 +0000
commitb74b2619779b1deb903b7766261807df1e9b1f7f (patch)
treebb7f16ed2886fa168b90d9f0765c81e89e245ebc
parentf24cc241876a97ccff907732aeff8f6bd925c242 (diff)
downloadbusybox-w32-b74b2619779b1deb903b7766261807df1e9b1f7f.tar.gz
busybox-w32-b74b2619779b1deb903b7766261807df1e9b1f7f.tar.bz2
busybox-w32-b74b2619779b1deb903b7766261807df1e9b1f7f.zip
libbb: let bb_make_directory accept backslashes in path
-rw-r--r--libbb/make_directory.c8
1 files changed, 8 insertions, 0 deletions
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)
51 } 51 }
52 52
53 org_mask = cur_mask = (mode_t)-1L; 53 org_mask = cur_mask = (mode_t)-1L;
54#if ENABLE_PLATFORM_MINGW32
55 /* normalise path separators, path is already assumed writable */
56 for (s=path; *s; ++s) {
57 if (*s == '\\') {
58 *s = '/';
59 }
60 }
61#endif
54 s = path; 62 s = path;
55 while (1) { 63 while (1) {
56 c = '\0'; 64 c = '\0';