From 44be915e702e63af8440902058fc4ad6b3fb1b75 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sat, 16 Aug 2014 20:02:47 +0100 Subject: stat: give directories write and execute permissions Microsoft Windows ignores the read-only attribute on directories and has no equivalent to the Unix execute permission on directories. Treat all directories as writable and searchable. --- win32/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/mingw.c b/win32/mingw.c index 9f225e88f..f98aec44b 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -182,7 +182,7 @@ static inline int file_attr_to_st_mode (DWORD attr) { int fMode = S_IREAD; if (attr & FILE_ATTRIBUTE_DIRECTORY) - fMode |= S_IFDIR; + fMode |= S_IFDIR|S_IWRITE|S_IEXEC; else fMode |= S_IFREG; if (!(attr & FILE_ATTRIBUTE_READONLY)) -- cgit v1.2.3-55-g6feb