SnapshotFilter is not empty if either NewerThan or OlderThan is set

This is required to allow `forget` without other snapshot limitations
This commit is contained in:
Kjetil Torgrim Homme 2025-02-10 20:12:37 +01:00
parent e588ee5bbe
commit 238d65ec3f
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ type SnapshotFilter struct {
}
func (f *SnapshotFilter) Empty() bool {
return len(f.Hosts)+len(f.Tags)+len(f.Paths) == 0
return len(f.Hosts)+len(f.Tags)+len(f.Paths) == 0 && f.NewerThan.Zero() && f.OlderThan.Zero()
}
func (f *SnapshotFilter) matches(sn *Snapshot) bool {