mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
fix: log tokio::fs::metadata errors
This commit is contained in:
18
src/sql.rs
18
src/sql.rs
@@ -914,13 +914,17 @@ pub async fn remove_unused_files(context: &Context) -> Result<()> {
|
||||
continue;
|
||||
}
|
||||
|
||||
let Ok(stats) = tokio::fs::metadata(entry.path()).await else {
|
||||
warn!(
|
||||
context,
|
||||
"Cannot get metadata for {}.",
|
||||
entry.path().display()
|
||||
);
|
||||
continue;
|
||||
let stats = match tokio::fs::metadata(entry.path()).await {
|
||||
Err(err) => {
|
||||
warn!(
|
||||
context,
|
||||
"Cannot get metadata for {}: {:#}.",
|
||||
entry.path().display(),
|
||||
err
|
||||
);
|
||||
continue;
|
||||
}
|
||||
Ok(stats) => stats,
|
||||
};
|
||||
|
||||
if stats.is_dir() {
|
||||
|
||||
Reference in New Issue
Block a user