Skip to content

Commit

Permalink
compat/mingw: rename the symlink, not the target (#5437)
Browse files Browse the repository at this point in the history
This fixes yet another fall-out from the `mingw_rename()` change that was introduced in v2.48.0.
  • Loading branch information
dscho authored and Git for Windows Build Agent committed Feb 22, 2025
2 parents f8f4265 + b49cd26 commit 15a9731
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2926,7 +2926,9 @@ int mingw_rename(const char *pold, const char *pnew)

old_handle = CreateFileW(wpold, DELETE,
FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE,
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
NULL);
if (old_handle == INVALID_HANDLE_VALUE) {
errno = err_win_to_posix(GetLastError());
return -1;
Expand Down

0 comments on commit 15a9731

Please sign in to comment.