diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-04-25 20:33:01 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-04-25 20:33:01 +0400 |
commit | 0dcfc3346a933ed3bbfc1947a31de68241b99ba0 (patch) | |
tree | f32077407ffcb9d7fd2118d7f4e6c224a60033d7 /winsup | |
parent | 026f9d290f5fe85fe9bd3a56be378fc794e28473 (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/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler.cc | 2 |
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. */ |