1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-22 07:43:06 +00:00

prune: fix exception when NAME is given, fixes #8486

This commit is contained in:
Thomas Waldmann 2024-10-23 22:51:35 +02:00
parent d510555b1b
commit 75b8030ed5
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -149,7 +149,7 @@ def do_prune(self, args, repository, manifest):
format = os.environ.get("BORG_PRUNE_FORMAT", "{archive:<36} {time} [{id}]")
formatter = ArchiveFormatter(format, repository, manifest, manifest.key, iec=args.iec)
match = args.name if args.name else args.match_archives
match = [args.name] if args.name else args.match_archives
archives = manifest.archives.list(match=match, sort_by=["ts"], reverse=True)
archives = [ai for ai in archives if "@PROT" not in ai.tags]