public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin/cygwin-3_3-branch] Revert "Cygwin: set the FILE_ATTRIBUTE_ARCHIVE DOS attribute on file creation"
Date: Tue, 16 Nov 2021 19:03:37 +0000 (GMT)	[thread overview]
Message-ID: <20211116190337.276613858401@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=67fbc6a7d01be187e8477395516863121920b13c

commit 67fbc6a7d01be187e8477395516863121920b13c
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue Nov 16 18:36:27 2021 +0100

    Revert "Cygwin: set the FILE_ATTRIBUTE_ARCHIVE DOS attribute on file creation"
    
    This reverts commit 2b28977149b1e8858b597890906f21cdecde84ce.
    
    This patch fixes the symptoms, but not the actual problem.  Revert
    and try again.

Diff:
---
 winsup/cygwin/exceptions.cc | 2 +-
 winsup/cygwin/fhandler.cc   | 3 +--
 winsup/cygwin/path.cc       | 4 ++--
 winsup/cygwin/release/3.3.3 | 4 ----
 4 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index eccddd780..a914110fe 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -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))
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 4e708595a..2a07e6cf9 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -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 ())
 	    {
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 2cf9de9ef..baf04ce89 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -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
diff --git a/winsup/cygwin/release/3.3.3 b/winsup/cygwin/release/3.3.3
index c1e8cefbd..e37844ad9 100644
--- a/winsup/cygwin/release/3.3.3
+++ b/winsup/cygwin/release/3.3.3
@@ -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


                 reply	other threads:[~2021-11-16 19:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211116190337.276613858401@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).