aboutsummaryrefslogtreecommitdiff
path: root/libbb/make_directory.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/make_directory.c')
-rw-r--r--libbb/make_directory.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libbb/make_directory.c b/libbb/make_directory.c
index b8da09901..9d7323129 100644
--- a/libbb/make_directory.c
+++ b/libbb/make_directory.c
@@ -34,6 +34,18 @@ int bb_make_directory (char *path, long mode, int flags)
34 char c; 34 char c;
35 struct stat st; 35 struct stat st;
36 36
37#ifdef __MINGW32__
38 /*
39 * If you are in root directory of a drive
40 * you cannot just mkdir "."
41 *
42 * This is caused by unzip.c:unzip_create_leading_dirs()
43 * where dirname() may return "."
44 */
45 if (!strcmp(path, "."))
46 return 0;
47#endif
48
37 mask = umask(0); 49 mask = umask(0);
38 if (mode == -1) { 50 if (mode == -1) {
39 umask(mask); 51 umask(mask);