diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-10-30 12:32:16 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-10-30 12:32:16 +0000 |
commit | 101f07b9078d2cbc3822b1fa5fe903ff622375cd (patch) | |
tree | 579229fe1c6a60bea61f19340c28ff18d23cebe3 /winsup/cygwin/fhandler_disk_file.cc | |
parent | 2b50cd503ebd6d5308735faa15eba9c695e2d1c2 (diff) | |
download | cygnal-101f07b9078d2cbc3822b1fa5fe903ff622375cd.tar.gz cygnal-101f07b9078d2cbc3822b1fa5fe903ff622375cd.tar.bz2 cygnal-101f07b9078d2cbc3822b1fa5fe903ff622375cd.zip |
* 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_disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 3ce09f093..81b274f3e 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -535,7 +535,7 @@ fhandler_base::fstat_helper (struct __stat64 *buf, { /* If read-only attribute is set, modify ntsec return value */ if (::has_attribute (dwFileAttributes, FILE_ATTRIBUTE_READONLY) - && !pc.issymlink ()) + && !pc.isdir () && !pc.issymlink ()) buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH); if (buf->st_mode & S_IFMT) @@ -554,7 +554,7 @@ fhandler_base::fstat_helper (struct __stat64 *buf, buf->st_mode |= STD_RBITS; if (!::has_attribute (dwFileAttributes, FILE_ATTRIBUTE_READONLY) - && !pc.issymlink ()) + && !pc.isdir () && !pc.issymlink ()) buf->st_mode |= STD_WBITS; /* | S_IWGRP | S_IWOTH; we don't give write to group etc */ |