Skip to content

Commit 1c0eed3

Browse files
committed
compat/mingw: rename the symlink, not the target (#5437)
This fixes yet another fall-out from the `mingw_rename()` change that was introduced in v2.48.0.
2 parents 855f8d6 + 9e099d8 commit 1c0eed3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compat/mingw.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -2926,7 +2926,9 @@ int mingw_rename(const char *pold, const char *pnew)
29262926

29272927
old_handle = CreateFileW(wpold, DELETE,
29282928
FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE,
2929-
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
2929+
NULL, OPEN_EXISTING,
2930+
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
2931+
NULL);
29302932
if (old_handle == INVALID_HANDLE_VALUE) {
29312933
errno = err_win_to_posix(GetLastError());
29322934
return -1;

0 commit comments

Comments
 (0)