Skip to content

Commit 515ee5b

Browse files
committed
libstd: do not follow symlinks in renameatW
This correctly mimicks POSIX behavior.
1 parent 9b595dd commit 515ee5b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/std/os.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2651,6 +2651,7 @@ pub fn renameatW(
26512651
.creation = windows.FILE_OPEN,
26522652
.io_mode = .blocking,
26532653
.filter = .any, // This function is supposed to rename both files and directories.
2654+
.follow_symlinks = false,
26542655
}) catch |err| switch (err) {
26552656
error.WouldBlock => unreachable, // Not possible without `.share_access_nonblocking = true`.
26562657
else => |e| return e,

0 commit comments

Comments
 (0)