mirror of
https://github.com/restic/restic.git
synced 2025-03-09 00:00:02 +01:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue