fix: Make incremental artifact deletion more robust
Should fix the intermittent errors reported in #57958 cc #48614
This commit is contained in:
parent
fbd34efb32
commit
a365287e10
@ -886,7 +886,10 @@ fn safe_remove_dir_all(p: &Path) -> io::Result<()> {
|
||||
fn safe_remove_file(p: &Path) -> io::Result<()> {
|
||||
if p.exists() {
|
||||
let canonicalized = p.canonicalize()?;
|
||||
std_fs::remove_file(canonicalized)
|
||||
match std_fs::remove_file(canonicalized) {
|
||||
Err(ref err) if err.kind() == io::ErrorKind::NotFound => Ok(()),
|
||||
result => result,
|
||||
}
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user