Skip to content

Commit c4cc685

Browse files
committed
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
2 parents bad5d1a + b30404d commit c4cc685

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,7 @@ 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_ATTRIBUTE_NORMAL, NULL);
2281+
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
22822282
if (old_handle == INVALID_HANDLE_VALUE) {
22832283
errno = err_win_to_posix(GetLastError());
22842284
return -1;

0 commit comments

Comments
 (0)