Skip to content

Commit bbca240

Browse files
committed
Merge branch 'ek/mingw-rename-symlink'
Symlink renaming fix. * ek/mingw-rename-symlink: compat/mingw: rename the symlink, not the target
2 parents 5a526e5 + 975fc04 commit bbca240

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
@@ -2278,7 +2278,9 @@ int mingw_rename(const char *pold, const char *pnew)
22782278

22792279
old_handle = CreateFileW(wpold, DELETE,
22802280
FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE,
2281-
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
2281+
NULL, OPEN_EXISTING,
2282+
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
2283+
NULL);
22822284
if (old_handle == INVALID_HANDLE_VALUE) {
22832285
errno = err_win_to_posix(GetLastError());
22842286
return -1;

0 commit comments

Comments
 (0)