diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-04-25 20:59:41 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-04-25 20:59:41 +0400 |
commit | fccdf679f4466de71ebe66cf4a3932f492ad85db (patch) | |
tree | 307ba7590647b79088c48171063d1ce8184df87e /winsup | |
parent | 703a42b96af53fce8747161effec026b085702ba (diff) |
* fhandler.cc (fhandler_base::open): Move handling FILE_ATTRIBUTE_NORMAL
back to its old place. Or it to file_attributes instead of setting it.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler.cc | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ab32fddf7..703f62c95 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2008-04-25 Corinna Vinschen <corinna@vinschen.de> + * fhandler.cc (fhandler_base::open): Move handling FILE_ATTRIBUTE_NORMAL + back to its old place. Or it to file_attributes instead of setting it. + +2008-04-25 Corinna Vinschen <corinna@vinschen.de> + * fhandler.cc (fhandler_base::open): *Only* handle SYSTEM and HIDDEN attributes in FILE_OVERWRITE case. diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index bac2618e2..e38a58226 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -539,7 +539,6 @@ fhandler_base::open (int flags, mode_t mode) if (get_device () == FH_FS) { - file_attributes = FILE_ATTRIBUTE_NORMAL; /* Add the reparse point flag to native symlinks, otherwise we open the target, not the symlink. This would break lstat. */ if (pc.is_rep_symlink ()) @@ -556,6 +555,8 @@ fhandler_base::open (int flags, mode_t mode) if (flags & O_CREAT) { + file_attributes |= FILE_ATTRIBUTE_NORMAL; + /* If mode has no write bits set, we set the R/O attribute. */ if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH))) file_attributes |= FILE_ATTRIBUTE_READONLY; |