Fix ChangeDetector to keep the dirMap from last scan

This commit is contained in:
Deluan
2020-01-17 22:41:10 -05:00
parent e55dfff485
commit ea9ed4a287
5 changed files with 32 additions and 27 deletions
+4 -4
View File
@@ -76,16 +76,16 @@ func (s *Scanner) RescanAll(fullRescan bool) error {
func (s *Scanner) Status() []StatusInfo { return nil }
func (i *Scanner) getLastModifiedSince(folder string) time.Time {
ms, err := i.repos.property.Get(model.PropLastScan + "-" + folder)
func (s *Scanner) getLastModifiedSince(folder string) time.Time {
ms, err := s.repos.property.Get(model.PropLastScan + "-" + folder)
if err != nil {
return time.Time{}
}
if ms == "" {
return time.Time{}
}
s, _ := strconv.ParseInt(ms, 10, 64)
return time.Unix(0, s*int64(time.Millisecond))
i, _ := strconv.ParseInt(ms, 10, 64)
return time.Unix(0, i*int64(time.Millisecond))
}
func (s *Scanner) updateLastModifiedSince(folder string, t time.Time) {