forget: Treat -1 as forever for all "last n" opts

This commit is contained in:
Torben Giesselmann
2023-03-04 19:01:37 -08:00
parent 6aca7dac21
commit b77b0749fa
5 changed files with 3664 additions and 3 deletions
-2
View File
@@ -108,8 +108,6 @@ func verifyForgetOptions(opts *ForgetOptions) error {
}
if !negValFound {
// durations := [6]restic.Duration{opts.Within, opts.WithinHourly, opts.WithinDaily,
// opts.WithinMonthly, opts.WithinWeekly, opts.WithinYearly}
for _, d := range [6]restic.Duration{opts.Within, opts.WithinHourly, opts.WithinDaily,
opts.WithinMonthly, opts.WithinWeekly, opts.WithinYearly} {
if d.Hours < -1 || d.Days < -1 || d.Months < -1 || d.Years < -1 {