Skip to content

Commit

Permalink
Rollup merge of rust-lang#59449 - Marwes:issue_57958, r=michaelwoerister
Browse files Browse the repository at this point in the history
fix: Make incremental artifact deletion more robust

Should fix the intermittent errors reported in rust-lang#57958

cc rust-lang#48614
  • Loading branch information
cuviper authored Mar 28, 2019
2 parents 1e9e80f + a365287 commit 6e65ae7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustc_incremental/persist/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down

0 comments on commit 6e65ae7

Please sign in to comment.