Skip to content

Commit 2ba09bc

Browse files
author
Jan Philipp Hafer
committed
add posix-like errors
1 parent c76ad3c commit 2ba09bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/std/os.zig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,6 +2660,9 @@ pub fn renameatW(
26602660
.SUCCESS => return,
26612661
// INVALID_PARAMETER here means that the filesystem does not support FileRenameInformationEx
26622662
.INVALID_PARAMETER => {},
2663+
.DIRECTORY_NOT_EMPTY => return error.PathAlreadyExists,
2664+
.FILE_IS_A_DIRECTORY => return error.IsDir,
2665+
.NOT_A_DIRECTORY => return error.NotDir,
26632666
// For all other statuses, fall down to the switch below to handle them.
26642667
else => need_fallback = false,
26652668
}

0 commit comments

Comments
 (0)