Skip to content

Commit

Permalink
ignore file not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
yihau committed Apr 20, 2023
1 parent 4a8b5f5 commit 30b616e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/cache/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,14 @@ impl CacheWrite {
format!("failed to put object `{:?}` in cache entry", path)
})?;
}
(Err(e), false) => return Err(e),
(Err(e), false) => {
if let Some(io_err) = e.downcast_ref::<io::Error>() {
if io_err.kind() == io::ErrorKind::NotFound {
continue
}
}
return Err(e)
}
(Err(_), true) => continue,
}
}
Expand Down

0 comments on commit 30b616e

Please sign in to comment.