Commit 515ee5b2fa

Jakub Konka <kubkon@jakubkonka.com>
2022-08-17 13:30:23
libstd: do not follow symlinks in renameatW
This correctly mimicks POSIX behavior.
1 parent 9b595dd
Changed files (1)
lib
std
lib/std/os.zig
@@ -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,