aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-22 22:26:54 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-23 04:44:36 +1000
commit524e0c922952e817fa178eb64a91056be3c47544 (patch)
tree58f2b0071e4a5b5e00f1661f05b9368f6c4e90ad
parent71aa9b002bacf3b32342cf5a319a4cd1a372feba (diff)
downloadbusybox-w32-524e0c922952e817fa178eb64a91056be3c47544.tar.gz
busybox-w32-524e0c922952e817fa178eb64a91056be3c47544.tar.bz2
busybox-w32-524e0c922952e817fa178eb64a91056be3c47544.zip
libbb/bb_make_directory() workaround mkdir(".")
-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);