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
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-04-25 20:33:01 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-04-25 20:33:01 +0400
commit0dcfc3346a933ed3bbfc1947a31de68241b99ba0 (patch)
treef32077407ffcb9d7fd2118d7f4e6c224a60033d7 /winsup
parent026f9d290f5fe85fe9bd3a56be378fc794e28473 (diff)
* fhandler.cc (fhandler_base::open): Handle SYSTEM and HIDDEN attributes
in FILE_OVERWRITE case as well.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c9177d2e5..951618ee5 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.cc (fhandler_base::open): Handle SYSTEM and HIDDEN attributes
+ in FILE_OVERWRITE case as well.
+
2008-04-24 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Disable calling
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 75711260b..7acbfb17a 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -544,7 +544,7 @@ fhandler_base::open (int flags, mode_t mode)
if (pc.is_rep_symlink ())
create_options |= FILE_OPEN_REPARSE_POINT;
- if (flags & O_CREAT)
+ if ((flags & O_CREAT) || create_disposition == FILE_OVERWRITE)
{
file_attributes = FILE_ATTRIBUTE_NORMAL;
/* If mode has no write bits set, we set the R/O attribute. */