mirror of https://github.com/restic/restic.git
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:
parent
e588ee5bbe
commit
238d65ec3f
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue