commit 515ee5b2fa0161e3df4cfe47c71847f8b3476bf2 (tree)
parent 9b595dd55f1ae336e2fb4e2a64334efe137dc19a
Author: Jakub Konka <kubkon@jakubkonka.com>
Date: Wed, 17 Aug 2022 13:30:23 +0200
libstd: do not follow symlinks in renameatW
This correctly mimicks POSIX behavior.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/lib/std/os.zig b/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,