]> sourceware.org Git - newlib-cygwin.git/commitdiff
Revert "Cygwin: set the FILE_ATTRIBUTE_ARCHIVE DOS attribute on file creation"
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 16 Nov 2021 17:36:27 +0000 (18:36 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 16 Nov 2021 18:58:56 +0000 (19:58 +0100)
This reverts commit 2b28977149b1e8858b597890906f21cdecde84ce.

This patch fixes the symptoms, but not the actual problem.  Revert
and try again.

winsup/cygwin/exceptions.cc
winsup/cygwin/fhandler.cc
winsup/cygwin/path.cc
winsup/cygwin/release/3.3.3

index eccddd78071309b1c60d3cfd83bb30639b7b9d4c..a914110fe386641f75f6f36a562d124eed5cff16 100644 (file)
@@ -157,7 +157,7 @@ cygwin_exception::open_stackdumpfile ()
       NTSTATUS status;
       /* Try to open it to dump the stack in it. */
       status = NtCreateFile (&h, GENERIC_WRITE | SYNCHRONIZE, &attr, &io,
-                            NULL, FILE_ATTRIBUTE_ARCHIVE, 0, FILE_OVERWRITE_IF,
+                            NULL, FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF,
                             FILE_SYNCHRONOUS_IO_NONALERT
                             | FILE_OPEN_FOR_BACKUP_INTENT, NULL, 0);
       if (NT_SUCCESS (status))
index 4e708595a8bca3418ef94808d099b5f4794a6ff3..2a07e6cf9c8e48f2c8cea39bc8c874ec3ad5ce0a 100644 (file)
@@ -649,8 +649,7 @@ fhandler_base::open (int flags, mode_t mode)
 
       if (flags & (O_CREAT | O_TMPFILE))
        {
-         file_attributes |= (flags & O_TMPFILE)
-                            ? FILE_ATTRIBUTE_NORMAL : FILE_ATTRIBUTE_ARCHIVE;
+         file_attributes |= FILE_ATTRIBUTE_NORMAL;
 
          if (pc.fs_is_nfs ())
            {
index 2cf9de9efdf3bab42a0b8d2f81bc49d5b2c770de..baf04ce89a082ccf65450a3f4b18a8eb3fb9b89d 100644 (file)
@@ -1945,7 +1945,7 @@ symlink_wsl (const char *oldpath, path_conv &win32_newpath)
   status = NtCreateFile (&fh, DELETE | FILE_GENERIC_WRITE
                             | READ_CONTROL | WRITE_DAC,
                         win32_newpath.get_object_attr (attr, sec_none_nih),
-                        &io, NULL, FILE_ATTRIBUTE_ARCHIVE,
+                        &io, NULL, FILE_ATTRIBUTE_NORMAL,
                         FILE_SHARE_VALID_FLAGS, FILE_CREATE,
                         FILE_SYNCHRONOUS_IO_NONALERT
                         | FILE_NON_DIRECTORY_FILE
@@ -2264,7 +2264,7 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
 
       status = NtCreateFile (&fh, access,
                             win32_newpath.get_object_attr (attr, sec_none_nih),
-                            &io, NULL, FILE_ATTRIBUTE_ARCHIVE,
+                            &io, NULL, FILE_ATTRIBUTE_NORMAL,
                             FILE_SHARE_VALID_FLAGS,
                             isdevice ? FILE_OVERWRITE_IF : FILE_CREATE,
                             FILE_SYNCHRONOUS_IO_NONALERT
index c1e8cefbd2225eb9fb3354a79e4d5fdb51823bf3..e37844ad9c7a92c85cebf9bd4cc722775f1277d9 100644 (file)
@@ -13,10 +13,6 @@ Bug Fixes
 - Fix showing DLL version info from native Windows tools.
   Addresses: https://cygwin.com/pipermail/cygwin/2021-November/249867.html
 
-- Fix long-standing problem that new files don't get created with the
-  FILE_ATTRIBUTE_ARCHIVE DOS attribute set.
-  Addresses: https://cygwin.com/pipermail/cygwin/2021-November/249909.html
-
 - Handle Unicode surrogate pairs in console. Cygwin console does not
   handle surrogate pairs correctly at the moment.  Fix issue that
   running bash in Windows Terminal and inserting an emoji does not
This page took 0.04451 seconds and 5 git commands to generate.