From 828e02953bd5cdb92d66f304ccc57c44e6bed502 Mon Sep 17 00:00:00 2001 From: yfprojects <62463991+real-yfprojects@users.noreply.github.com> Date: Wed, 5 Apr 2023 11:08:06 +0000 Subject: [PATCH] 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. --- src/vorta/borg/extract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vorta/borg/extract.py b/src/vorta/borg/extract.py index e3cd3d5e9..148141830 100644 --- a/src/vorta/borg/extract.py +++ b/src/vorta/borg/extract.py @@ -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)