summaryrefslogtreecommitdiff
path: root/modules/borgsnap
diff options
context:
space:
mode:
Diffstat (limited to 'modules/borgsnap')
-rw-r--r--modules/borgsnap/borgsnap/borgsnap/__main__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/borgsnap/borgsnap/borgsnap/__main__.py b/modules/borgsnap/borgsnap/borgsnap/__main__.py
index 91144780..ad46a7bf 100644
--- a/modules/borgsnap/borgsnap/borgsnap/__main__.py
+++ b/modules/borgsnap/borgsnap/borgsnap/__main__.py
@@ -246,7 +246,9 @@ def create(*, snapshot, target, archive_prefix, dry_run):
246 env['BORG_FILES_CACHE_SUFFIX'] = basename 246 env['BORG_FILES_CACHE_SUFFIX'] = basename
247 archive_name = _archive_name(snapshot, target, archive_prefix) 247 archive_name = _archive_name(snapshot, target, archive_prefix)
248 target_host, _, target_path = target.rpartition(':') 248 target_host, _, target_path = target.rpartition(':')
249 *parents_init, _ = list(Path(target_path).parents) 249 parents_init = list()
250 if Path(target_path).parents:
251 *parents_init, _ = list(Path(target_path).parents)
250 backup_patterns = [*(map(lambda p: Path('.backup') / f'{target_host}:{p}', [Path(target_path), *parents_init])), Path('.backup') / target_host, Path('.backup')] 252 backup_patterns = [*(map(lambda p: Path('.backup') / f'{target_host}:{p}', [Path(target_path), *parents_init])), Path('.backup') / target_host, Path('.backup')]
251 for pattern_file in backup_patterns: 253 for pattern_file in backup_patterns:
252 if (dir / pattern_file).is_file(): 254 if (dir / pattern_file).is_file():