Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-10-30 15:32:16 +0300
committerCorinna Vinschen <corinna@vinschen.de>2007-10-30 15:32:16 +0300
commit101f07b9078d2cbc3822b1fa5fe903ff622375cd (patch)
tree579229fe1c6a60bea61f19340c28ff18d23cebe3 /winsup/cygwin/fhandler.cc
parent2b50cd503ebd6d5308735faa15eba9c695e2d1c2 (diff)
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't remove
write bits for directories with R/O attribute. (fhandler_base::fhaccess): Don't shortcircuit R/O attribute with W_OK scenarios for directories.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 130607802..bc30a396c 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -376,7 +376,8 @@ fhandler_base::fhaccess (int flags)
if (is_fs_special ())
/* short circuit */;
- else if (has_attribute (FILE_ATTRIBUTE_READONLY) && (flags & W_OK))
+ else if (has_attribute (FILE_ATTRIBUTE_READONLY) && (flags & W_OK)
+ && !pc.isdir ())
goto eaccess_done;
else if (has_acls () && allow_ntsec)
{