From fe53a603da186a462f57f947a091059ff22cd45e Mon Sep 17 00:00:00 2001 From: Gareth George Date: Sat, 28 Jun 2025 15:23:10 -0700 Subject: [PATCH] fix(prune): correctly handle max-unused 0% --- internal/orchestrator/repo/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/orchestrator/repo/repo.go b/internal/orchestrator/repo/repo.go index 3e419a0f..37d8e4e2 100644 --- a/internal/orchestrator/repo/repo.go +++ b/internal/orchestrator/repo/repo.go @@ -261,7 +261,7 @@ func (r *RepoOrchestrator) Prune(ctx context.Context, output io.Writer) error { var opts []restic.GenericOption if policy.MaxUnusedBytes != 0 { opts = append(opts, restic.WithFlags("--max-unused", fmt.Sprintf("%vB", policy.MaxUnusedBytes))) - } else if policy.MaxUnusedPercent != 0 { + } else { opts = append(opts, restic.WithFlags("--max-unused", fmt.Sprintf("%v%%", policy.MaxUnusedPercent))) }