summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-12-23 18:32:16 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-23 18:32:16 +0100
commitc4cc685a62ffc06c86b1ecd1382c1b5cd0166189 (patch)
tree6e1205cc16faaefe354f6b496662adda01972e83
parentMerge branch 'js/github-windows-setup-fix' (diff)
parentmingw_rename: do support directory renames (diff)
downloadgit-c4cc685a62ffc06c86b1ecd1382c1b5cd0166189.tar.xz
git-c4cc685a62ffc06c86b1ecd1382c1b5cd0166189.zip
Merge branch 'js/mingw-rename-fix'
Update the way rename() emulation on Windows handle directories to correct an earlier attempt to do the same. * js/mingw-rename-fix: mingw_rename: do support directory renames
-rw-r--r--compat/mingw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 408b1a3102..1d5b211b54 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -2278,7 +2278,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;