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