diff options
| author | Paul Buetow <paul@buetow.org> | 2024-11-03 10:57:55 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-11-03 10:57:55 +0200 |
| commit | 85a818d03c1e442ef005b771a76ffb977c59fe75 (patch) | |
| tree | 2a87aa33c2519b49fe76361616b8c215f54c949f /internal/schedule | |
| parent | 81af1067ef8bde2ed94d189bd1a6d67641c6c639 (diff) | |
fix
Diffstat (limited to 'internal/schedule')
| -rw-r--r-- | internal/schedule/stats.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/schedule/stats.go b/internal/schedule/stats.go index 77271fe..cde9de4 100644 --- a/internal/schedule/stats.go +++ b/internal/schedule/stats.go @@ -71,16 +71,17 @@ func (s *stats) gatherPostedStats(dir string, lookbackTime time.Time) error { if ent.State != entry.Posted || ent.Time.Before(lookbackTime) { return nil } + // Ignore .now. + if strings.Contains(file.Name(), ".now.") { + return nil + } if ent.Time.Before(oldest) { oldest = ent.Time } if ent.Time.After(newest) { newest = ent.Time } - // Ignore .now. - if !strings.Contains(file.Name(), ".now.") { - s.posted++ - } + s.posted++ return nil }) if err != nil { |
