From: Patrick Steinhardt <ps@pks.im>
To: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] mingw_rename: do support directory renames
Date: Wed, 18 Dec 2024 07:00:37 +0100 [thread overview]
Message-ID: <Z2JlBQ4DNf7tsNxV@pks.im> (raw)
In-Reply-To: <pull.1839.git.1734439924842.gitgitgadget@gmail.com>
On Tue, Dec 17, 2024 at 12:52:04PM +0000, Johannes Schindelin via GitGitGadget wrote:
> diff --git a/compat/mingw.c b/compat/mingw.c
> index c4320769db6..e8f491d03a7 100644
> --- a/compat/mingw.c
> +++ b/compat/mingw.c
> @@ -2273,7 +2273,7 @@ repeat:
>
> old_handle = CreateFileW(wpold, DELETE,
> FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE,
> - NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
> + NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
> if (old_handle == INVALID_HANDLE_VALUE) {
> errno = err_win_to_posix(GetLastError());
> return -1;
Okay. I saw that FILE_FLAG_BACKUP_SEMANTICS was used in several other
users of `CreateFileW()` in this context, but I couldn't find good
enough information around what it is actually doing anywhere. The
explanation makes sense to me, so thanks for the follow-up fix!
Patrick
prev parent reply other threads:[~2024-12-18 6:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 12:52 [PATCH] mingw_rename: do support directory renames Johannes Schindelin via GitGitGadget
2024-12-17 20:09 ` Junio C Hamano
2024-12-18 6:00 ` Patrick Steinhardt [this message]
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=Z2JlBQ4DNf7tsNxV@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johannes.schindelin@gmx.de \
/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 NNTP newsgroup(s).