Fixed a bug where DB indexing was broken on Linux

On platforms where file creation type isn't available, use modification time instead
This commit is contained in:
Antoine Gersant 2017-05-07 23:49:36 -07:00
parent 5781d4cbe5
commit c464b755e5

View file

@ -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();