From c464b755e5c5d3bb0ab3fde8bc1525c4657b0ed2 Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Sun, 7 May 2017 23:49:36 -0700 Subject: [PATCH] Fixed a bug where DB indexing was broken on Linux On platforms where file creation type isn't available, use modification time instead --- src/index.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.rs b/src/index.rs index c313337..bcbc795 100644 --- a/src/index.rs +++ b/src/index.rs @@ -129,7 +129,8 @@ impl<'db> IndexBuilder<'db> { let metadata = fs::metadata(directory.path.as_str())?; let created = metadata - .created()? + .created() + .or(metadata.modified())? .duration_since(time::UNIX_EPOCH)? .as_secs();