From 19b63f5a15077b222c85456ce94ed6196126bd16 Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Tue, 6 Feb 2024 21:41:55 -0500 Subject: [PATCH] Fix filesystem not working if creation date unavailable (e.g. in NFS mounts) --- src/storage/filesystem.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/storage/filesystem.rs b/src/storage/filesystem.rs index b3d190c..32272ec 100644 --- a/src/storage/filesystem.rs +++ b/src/storage/filesystem.rs @@ -184,7 +184,13 @@ impl FileStorage { name: version_name, hash: hash_str, 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, updates: updates_stat, });