diff --git a/library/std/src/sys/pal/solid/fs.rs b/library/std/src/sys/pal/solid/fs.rs index 591be66fcb4..bce9aa6d99c 100644 --- a/library/std/src/sys/pal/solid/fs.rs +++ b/library/std/src/sys/pal/solid/fs.rs @@ -538,7 +538,7 @@ pub fn remove_dir_all(path: &Path) -> io::Result<()> { } }; // ignore internal NotFound errors - if let Err(err) = result + if let Err(err) = &result && err.kind() != io::ErrorKind::NotFound { return result;