From 9238d125373a652a34e7d34636e237912d1350c0 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Mon, 25 Jan 2021 12:16:56 +0100 Subject: [PATCH] windows: make sure to handle PATH_NOT_FOUND when deleting files Fixes #7879 --- lib/std/os/windows.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index f0530e53b2..e1e325d9f6 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -858,6 +858,7 @@ pub fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFil .SUCCESS => return CloseHandle(tmp_handle), .OBJECT_NAME_INVALID => unreachable, .OBJECT_NAME_NOT_FOUND => return error.FileNotFound, + .OBJECT_PATH_NOT_FOUND => return error.FileNotFound, .INVALID_PARAMETER => unreachable, .FILE_IS_A_DIRECTORY => return error.IsDir, .NOT_A_DIRECTORY => return error.NotDir,