| ... | @@ -745,6 +745,7 @@ pub const RemoveDirectoryError = error{ | ... | @@ -745,6 +745,7 @@ pub const RemoveDirectoryError = error{ |
| 745 | FileNotFound, | 745 | FileNotFound, |
| 746 | DirNotEmpty, | 746 | DirNotEmpty, |
| 747 | Unexpected, | 747 | Unexpected, |
| | 748 | NotDir, |
| 748 | }; | 749 | }; |
| 749 | | 750 | |
| 750 | pub fn RemoveDirectory(dir_path: []const u8) RemoveDirectoryError!void { | 751 | pub fn RemoveDirectory(dir_path: []const u8) RemoveDirectoryError!void { |
| ... | @@ -757,6 +758,7 @@ pub fn RemoveDirectoryW(dir_path_w: [*:0]const u16) RemoveDirectoryError!void { | ... | @@ -757,6 +758,7 @@ pub fn RemoveDirectoryW(dir_path_w: [*:0]const u16) RemoveDirectoryError!void { |
| 757 | switch (kernel32.GetLastError()) { | 758 | switch (kernel32.GetLastError()) { |
| 758 | .PATH_NOT_FOUND => return error.FileNotFound, | 759 | .PATH_NOT_FOUND => return error.FileNotFound, |
| 759 | .DIR_NOT_EMPTY => return error.DirNotEmpty, | 760 | .DIR_NOT_EMPTY => return error.DirNotEmpty, |
| | 761 | .DIRECTORY => return error.NotDir, |
| 760 | else => |err| return unexpectedError(err), | 762 | else => |err| return unexpectedError(err), |
| 761 | } | 763 | } |
| 762 | } | 764 | } |