mirror of
https://github.com/borgbase/vorta
synced 2024-12-21 23:33:13 +00:00
Correctly supply prune pattern for borg >=1.2.2 (#1565)
Adds different behaviour when borg version >=1.2.2 but <2.0.0: The prune pattern is supplied without a style prefix like `sh:`. Fixes #1564. --------- Co-authored-by: herrwusel <herrwusel@user.noreply.github.com> Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
This commit is contained in:
parent
a4ab7e713a
commit
ffafcee05c
1 changed files with 4 additions and 2 deletions
|
@ -47,8 +47,10 @@ def prepare(cls, profile):
|
|||
if profile.prune_prefix:
|
||||
formatted_prune_prefix = format_archive_name(profile, profile.prune_prefix)
|
||||
|
||||
if borg_compat.check('V122'):
|
||||
pruning_opts += ['-a', 'sh:' + formatted_prune_prefix + '*']
|
||||
if borg_compat.check('V2'):
|
||||
pruning_opts += ['-a', f"sh:{formatted_prune_prefix}*"]
|
||||
elif borg_compat.check('V122'):
|
||||
pruning_opts += ['-a', f"{formatted_prune_prefix}*"]
|
||||
else:
|
||||
pruning_opts += ['--prefix', formatted_prune_prefix]
|
||||
|
||||
|
|
Loading…
Reference in a new issue