Resultify tools::delete_file()

This commit is contained in:
link2xt
2023-01-28 11:33:01 +00:00
parent ae564ef702
commit ba3e4c5dff
3 changed files with 55 additions and 58 deletions

View File

@@ -798,7 +798,14 @@ pub async fn remove_unused_files(context: &Context) -> Result<()> {
entry.file_name()
);
let path = entry.path();
delete_file(context, path).await;
if let Err(err) = delete_file(context, &path).await {
error!(
context,
"Failed to delete unused file {}: {:#}.",
path.display(),
err
);
}
}
}
Err(err) => {