Fix filesystem not working if creation date unavailable (e.g. in NFS mounts)

This commit is contained in:
NGnius (Graham) 2024-02-06 21:41:55 -05:00
parent 7f1a001f63
commit 19b63f5a15

View file

@ -184,7 +184,13 @@ impl FileStorage {
name: version_name, name: version_name,
hash: hash_str, hash: hash_str,
artifact: Some(artifact_url), artifact: Some(artifact_url),
created: Some(entry.metadata()?.created()?.into()), created: match entry.metadata()?.created() {
Ok(t) => Some(t.into()),
Err(e) => {
log::debug!("Failed to get created date of {}: {}", entry_path.display(), e);
None
}
},
downloads: downloads_stat, downloads: downloads_stat,
updates: updates_stat, updates: updates_stat,
}); });