authorgravatar for timonkruiper@gmail.comTimon Kruiper <timonkruiper@gmail.com> 2021-01-25 12:16:56+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-01-25 10:33:08-08:00
log9238d125373a652a34e7d34636e237912d1350c0
tree70ce545cdf283364cbb7787fbaa795c2636ae3c9
parent0cfa39304b18c6a04689bd789f5dc4d035ec43b0

windows: make sure to handle PATH_NOT_FOUND when deleting files

Fixes #7879

1 files changed, 1 insertions(+), 0 deletions(-)

lib/std/os/windows.zig+1
...@@ -858,6 +858,7 @@ pub fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFil...@@ -858,6 +858,7 @@ pub fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFil
858 .SUCCESS => return CloseHandle(tmp_handle),858 .SUCCESS => return CloseHandle(tmp_handle),
859 .OBJECT_NAME_INVALID => unreachable,859 .OBJECT_NAME_INVALID => unreachable,
860 .OBJECT_NAME_NOT_FOUND => return error.FileNotFound,860 .OBJECT_NAME_NOT_FOUND => return error.FileNotFound,
861 .OBJECT_PATH_NOT_FOUND => return error.FileNotFound,
861 .INVALID_PARAMETER => unreachable,862 .INVALID_PARAMETER => unreachable,
862 .FILE_IS_A_DIRECTORY => return error.IsDir,863 .FILE_IS_A_DIRECTORY => return error.IsDir,
863 .NOT_A_DIRECTORY => return error.NotDir,864 .NOT_A_DIRECTORY => return error.NotDir,