From: Christian Franke <Christian.Franke@t-online.de>
To: cygwin@cygwin.com
Subject: Re: Editing with vim clears Windows 10 file system archive bit.
Date: Mon, 15 Nov 2021 19:54:36 +0100 [thread overview]
Message-ID: <305aedc4-9bb2-02b8-f5ab-f88aba39e9cf@t-online.de> (raw)
In-Reply-To: <SN6PR04MB4799AEB60421601D02E22680BB979@SN6PR04MB4799.namprd04.prod.outlook.com>
Steve Ward via Cygwin wrote:
> Description of problem:
> While using vim 8.2 on cygwin 3.3 (x86_64) on Windows 10,
> when editing an existing file with vim and saving it, the Window’s
> file system archive bit is always left cleared (not modified state).
> This happens, whether the archive bit was set (is modified) or
> clear (not modified) initially.
The problem also occurs with 'cp' command:
$ touch file1
$ /bin/cp file1 file2
$ /bin/cp --preserve=mode file1 file3
$ lsattr file?
---a-------- file1
---a-------- file2
------------ file3
Some Cygwin functions apparently clear the archive attribute
unexpectedly, for example:
int fd = open(filename, O_CREAT|O_TRUNC|O_WRONLY, 0644);
write(fd, "Test\n", 5);
fchmod(fd, 0644); // clears archive attribute
close(fd);
Same with facl(., SETACL, ...). The variants chmod() and acl() are not
affected.
Regards,
Christian
next prev parent reply other threads:[~2021-11-15 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-14 18:56 Steve Ward
2021-11-15 18:54 ` Christian Franke [this message]
2021-11-15 20:05 ` Corinna Vinschen
2021-11-15 22:18 ` Gary Johnson
2021-11-16 14:06 ` Corinna Vinschen
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=305aedc4-9bb2-02b8-f5ab-f88aba39e9cf@t-online.de \
--to=christian.franke@t-online.de \
--cc=cygwin@cygwin.com \
/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).