handle fs metadata.created() not present

This commit is contained in:
2025-07-17 17:37:39 +02:00
parent c1f1185ad4
commit d8963e1f2d
6 changed files with 14 additions and 8 deletions

View File

@@ -73,7 +73,11 @@ impl FileSystem {
}
};
let metadata = entry.metadata().await?;
let created_at = metadata.created()?.duration_since(UNIX_EPOCH)?.as_secs();
let created_at = metadata
.created()
.ok()
.map(|c| c.duration_since(UNIX_EPOCH).ok().map(|c| c.as_secs()))
.flatten();
let mime_type = match file_type {
FileType::File => FileMimeType::from_name(&name),