瀏覽代碼

Merge pull request #8487 from ThomasWaldmann/fix-8486

prune: fix exception when NAME is given, fixes #8486
TW 7 月之前
父節點
當前提交
defb7237ed
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/borg/archiver/prune_cmd.py

+ 1 - 1
src/borg/archiver/prune_cmd.py

@@ -149,7 +149,7 @@ class PruneMixIn:
             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]