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

@@ -44,6 +44,11 @@ func (scanner *Scanner) ScanExisting(existing file.FileBased, file file.SourceFi
return nil, false, err
}
// we don't currently store sizes for gallery files
// clear the file size so that we don't incorrectly detect a
// change
scanned.New.Size = ""
retGallery = existing.(*models.Gallery)
path := scanned.New.Path
@@ -51,8 +56,6 @@ func (scanner *Scanner) ScanExisting(existing file.FileBased, file file.SourceFi
changed := false
if scanned.ContentsChanged() {
logger.Infof("%s has been updated: rescanning", path)
retGallery.SetFile(*scanned.New)
changed = true
} else if scanned.FileUpdated() {