aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/mingw.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/win32/mingw.c b/win32/mingw.c
index 8045fb996..dfdbecc85 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -762,7 +762,20 @@ const char *get_busybox_exec_path(void)
762#undef mkdir 762#undef mkdir
763int mingw_mkdir(const char *path, int mode UNUSED_PARAM) 763int mingw_mkdir(const char *path, int mode UNUSED_PARAM)
764{ 764{
765 return mkdir(path); 765 int ret;
766 struct stat st;
767 int lerrno = 0;
768
769 if ( (ret=mkdir(path)) < 0 ) {
770 lerrno = errno;
771 if ( lerrno == EACCES && stat(path, &st) == 0 ) {
772 ret = 0;
773 lerrno = 0;
774 }
775 }
776
777 errno = lerrno;
778 return ret;
766} 779}
767 780
768int fcntl(int fd, int cmd, ...) 781int fcntl(int fd, int cmd, ...)