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:
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 15f39e42f..43aeff6b4 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -746,7 +746,12 @@ fhandler_disk_file::facl (int cmd, int nentries, __aclent32_t *aclbufp)
{
case SETACL:
if (!aclsort32 (nentries, 0, aclbufp))
- res = setacl (get_io_handle (), pc, nentries, aclbufp);
+ {
+ bool rw = false;
+ res = setacl (get_io_handle (), pc, nentries, aclbufp, rw);
+ if (rw)
+ SetFileAttributes (pc, (DWORD) pc & ~FILE_ATTRIBUTE_READONLY);
+ }
break;
case GETACL:
if (!aclbufp)