From 238d65ec3ffe64f63e718e483d1577aac5966248 Mon Sep 17 00:00:00 2001 From: Kjetil Torgrim Homme Date: Mon, 10 Feb 2025 20:12:37 +0100 Subject: [PATCH] SnapshotFilter is not empty if either NewerThan or OlderThan is set This is required to allow `forget` without other snapshot limitations --- internal/restic/snapshot_find.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/restic/snapshot_find.go b/internal/restic/snapshot_find.go index 39d8765d4..ee00cc9bc 100644 --- a/internal/restic/snapshot_find.go +++ b/internal/restic/snapshot_find.go @@ -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 {