Skip to content

Commit 8e18272

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 c99de7f + a02cf58 commit 8e18272

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compat/mingw.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,9 @@ int mingw_rename(const char *pold, const char *pnew)
26182618

26192619
old_handle = CreateFileW(wpold, DELETE,
26202620
FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE,
2621-
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
2621+
NULL, OPEN_EXISTING,
2622+
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
2623+
NULL);
26222624
if (old_handle == INVALID_HANDLE_VALUE) {
26232625
errno = err_win_to_posix(GetLastError());
26242626
return -1;

0 commit comments

Comments
 (0)