diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ab32fddf7..703f62c95 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-04-25 Corinna Vinschen + + * 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 * fhandler.cc (fhandler_base::open): *Only* handle SYSTEM and HIDDEN 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;