Skip to content

Commit 088f81d

Browse files
committed
fix(cleanup): fixed a bug with time comparisons
1 parent 635f4d6 commit 088f81d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

internal/cleanup/execute.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ func Execute(cfg *Config, log *logrus.Logger) error {
6666
return fmt.Errorf("could not get file info: %w", err)
6767
}
6868

69-
if fileInfo.ModTime().After(maxRetentionDay) {
69+
if fileInfo.ModTime().Before(maxRetentionDay) {
7070
deletionQueue = append(deletionQueue, file)
7171
mbToSave += (float64(fileInfo.Size()/ByteDivisor) / ByteDivisor)
72-
} else {
73-
log.Debugf("Skipping %s: mod time: %v", file.Name(), fileInfo.ModTime())
7472
}
7573
}
7674

0 commit comments

Comments
 (0)