Skip to content

Commit 6e65ae7

Browse files
authored
Rollup merge of #59449 - Marwes:issue_57958, r=michaelwoerister
fix: Make incremental artifact deletion more robust Should fix the intermittent errors reported in #57958 cc #48614
2 parents 1e9e80f + a365287 commit 6e65ae7

File tree

1 file changed

+4
-1
lines changed
  • src/librustc_incremental/persist

1 file changed

+4
-1
lines changed

src/librustc_incremental/persist/fs.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,10 @@ fn safe_remove_dir_all(p: &Path) -> io::Result<()> {
886886
fn safe_remove_file(p: &Path) -> io::Result<()> {
887887
if p.exists() {
888888
let canonicalized = p.canonicalize()?;
889-
std_fs::remove_file(canonicalized)
889+
match std_fs::remove_file(canonicalized) {
890+
Err(ref err) if err.kind() == io::ErrorKind::NotFound => Ok(()),
891+
result => result,
892+
}
890893
} else {
891894
Ok(())
892895
}

0 commit comments

Comments
 (0)