From 524e0c922952e817fa178eb64a91056be3c47544 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Wed, 22 Apr 2009 22:26:54 +1000 Subject: libbb/bb_make_directory() workaround mkdir(".") --- libbb/make_directory.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libbb') 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) char c; struct stat st; +#ifdef __MINGW32__ + /* + * If you are in root directory of a drive + * you cannot just mkdir "." + * + * This is caused by unzip.c:unzip_create_leading_dirs() + * where dirname() may return "." + */ + if (!strcmp(path, ".")) + return 0; +#endif + mask = umask(0); if (mode == -1) { umask(mask); -- cgit v1.2.3-55-g6feb