mirror of
https://github.com/borgbase/vorta
synced 2024-12-21 23:33:13 +00:00
Use pf
pattern format for extract. By @real-yfprojects (#1625)
* src/vorta/borg/extract.py : The pattern file passed to borg now contains `pf`-style patterns for included paths.
This commit is contained in:
parent
6d5e738107
commit
828e02953b
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ def prepare(cls, profile, archive_name, model: ExtractTree, destination_folder):
|
|||
# Unselected (and excluded) parent folders will be restored by borg
|
||||
# but without the metadata stored in the archive.
|
||||
pattern_file = tempfile.NamedTemporaryFile('w', delete=True)
|
||||
pattern_file.write("P fm\n")
|
||||
pattern_file.write("P pf\n")
|
||||
|
||||
indexes = [QModelIndex()]
|
||||
while indexes:
|
||||
|
@ -54,7 +54,7 @@ def prepare(cls, profile, archive_name, model: ExtractTree, destination_folder):
|
|||
if item.data.checkstate == Qt.CheckState.Checked:
|
||||
pattern_file.write("+ " + path_to_str(item.path) + "\n")
|
||||
|
||||
pattern_file.write("- *\n")
|
||||
pattern_file.write("- fm:*\n")
|
||||
pattern_file.flush()
|
||||
cmd.extend(['--patterns-from', pattern_file.name])
|
||||
ret['cleanup_files'].append(pattern_file)
|
||||
|
|
Loading…
Reference in a new issue