aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-22 22:27:24 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-23 04:44:36 +1000
commitd90250d75cd624a6dc0156f98952ff418379948a (patch)
tree0483e2ad853cfbb1bbf0b09bc8432c3930f21181
parent524e0c922952e817fa178eb64a91056be3c47544 (diff)
downloadbusybox-w32-d90250d75cd624a6dc0156f98952ff418379948a.tar.gz
busybox-w32-d90250d75cd624a6dc0156f98952ff418379948a.tar.bz2
busybox-w32-d90250d75cd624a6dc0156f98952ff418379948a.zip
libbb/bb_make_directory() recognize Windows drives as root directories
-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 9d7323129..db4609e84 100644
--- a/libbb/make_directory.c
+++ b/libbb/make_directory.c
@@ -60,6 +60,14 @@ int bb_make_directory (char *path, long mode, int flags)
60 c = 0; 60 c = 0;
61 61
62 if (flags & FILEUTILS_RECUR) { /* Get the parent. */ 62 if (flags & FILEUTILS_RECUR) { /* Get the parent. */
63#ifdef __MINGW32__
64 /* skip drive letter and initial slashes */
65 if (s == path && *s && s[1] == ':') {
66 s += 2;
67 while (*s == '/')
68 s++;
69 }
70#endif
63 /* Bypass leading non-'/'s and then subsequent '/'s. */ 71 /* Bypass leading non-'/'s and then subsequent '/'s. */
64 while (*s) { 72 while (*s) {
65 if (*s == '/') { 73 if (*s == '/') {