File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,22 @@ impl LruDiskCache {
225225 //TODO: check that files are removable during `init`, so that this is only
226226 // due to outside interference.
227227 fs:: remove_file ( & remove_path) . unwrap_or_else ( |e| {
228- panic ! ( "Error removing file from cache: `{:?}`: {}" , remove_path, e)
228+ // Sometimes the file has already been removed
229+ // this seems to happen when the max cache size has been reached
230+ // https://github.com/mozilla/sccache/issues/2092
231+ if e. kind ( ) == std:: io:: ErrorKind :: NotFound {
232+ debug ! (
233+ "Error removing file from cache as it was not found: `{:?}`" ,
234+ remove_path
235+ ) ;
236+ } else {
237+ panic ! (
238+ "Error removing file from cache: `{:?}`: {}, {:?}" ,
239+ remove_path,
240+ e,
241+ e. kind( )
242+ )
243+ }
229244 } ) ;
230245 }
231246 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments