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
Centril authored Mar 27, 2019
2 parents d42e5eb + a365287 commit a4b4253
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 a4b4253

Please sign in to comment.