File size scanning fixes (#1944)

This commit is contained in:
WithoutPants
2021-11-04 10:50:03 +11:00
committed by GitHub
parent 206f86e304
commit 602183cca9
2 changed files with 6 additions and 2 deletions

View File

@@ -77,6 +77,7 @@ func (o Scanner) ScanExisting(existing FileBased, file SourceFile) (h *Scanned,
// update existing data if needed
// truncate to seconds, since we don't store beyond that in the database
updatedFile.FileModTime = info.ModTime().Truncate(time.Second)
updatedFile.Size = strconv.FormatInt(info.Size(), 10)
modTimeChanged := !existingFile.FileModTime.Equal(updatedFile.FileModTime)