libstd: do not follow symlinks in renameatW

This correctly mimicks POSIX behavior.
This commit is contained in:
Jakub Konka 2022-08-17 13:30:23 +02:00
parent 9b595dd55f
commit 515ee5b2fa

View File

@ -2651,6 +2651,7 @@ pub fn renameatW(
.creation = windows.FILE_OPEN,
.io_mode = .blocking,
.filter = .any, // This function is supposed to rename both files and directories.
.follow_symlinks = false,
}) catch |err| switch (err) {
error.WouldBlock => unreachable, // Not possible without `.share_access_nonblocking = true`.
else => |e| return e,