Package: handle Windows PathAlreadyExists error code
Unfortunately, error.AccessDenied is ambiguous on Windows when it is returned from fs.rename.
This commit is contained in:
@@ -570,7 +570,7 @@ fn renameTmpIntoCache(
|
||||
};
|
||||
continue;
|
||||
},
|
||||
error.PathAlreadyExists => {
|
||||
error.PathAlreadyExists, error.AccessDenied => {
|
||||
// Package has been already downloaded and may already be in use on the system.
|
||||
cache_dir.deleteTree(tmp_dir_sub_path) catch |del_err| {
|
||||
std.log.warn("unable to delete temp directory: {s}", .{@errorName(del_err)});
|
||||
|
||||
Reference in New Issue
Block a user