mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-05-04 03:50:30 +00:00
fix(prune): correctly handle max-unused 0%
This commit is contained in:
@@ -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)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user