Replaces fs-err in remove_tmp_snapshot_archives() (#34839)

This commit is contained in:
Brooks 2024-01-18 17:40:45 -05:00 committed by GitHub
parent 10590a3bcb
commit 3388507878
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -641,12 +641,15 @@ pub fn remove_tmp_snapshot_archives(snapshot_archives_dir: impl AsRef<Path>) {
{
let path = entry.path();
let result = if path.is_dir() {
fs_err::remove_dir_all(path)
fs::remove_dir_all(&path)
} else {
fs_err::remove_file(path)
fs::remove_file(&path)
};
if let Err(err) = result {
warn!("Failed to remove temporary snapshot archive: {err}");
warn!(
"Failed to remove temporary snapshot archive '{}': {err}",
path.display(),
);
}
}
}