OSDN Git Service

* fhandler.cc (fhandler_base::open): Handle SYSTEM and HIDDEN attributes
authorcorinna <corinna>
Fri, 25 Apr 2008 16:33:00 +0000 (16:33 +0000)
committercorinna <corinna>
Fri, 25 Apr 2008 16:33:00 +0000 (16:33 +0000)
in FILE_OVERWRITE case as well.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.cc

index c9177d2..951618e 100644 (file)
@@ -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
index 7571126..7acbfb1 100644 (file)
@@ -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. */