From 2cd1de1f16dd60287443b32513d39d2f31cdf142 Mon Sep 17 00:00:00 2001 From: Manu <3916435+m3nu@users.noreply.github.com> Date: Thu, 5 Dec 2024 14:02:54 +0000 Subject: [PATCH] Ensure no empty exclude-if-present is added (#2136) --- src/vorta/borg/create.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vorta/borg/create.py b/src/vorta/borg/create.py index 171265c0..98147a55 100644 --- a/src/vorta/borg/create.py +++ b/src/vorta/borg/create.py @@ -171,7 +171,8 @@ def prepare(cls, profile): patterns.append(f[3:].strip()) # Remove the '[x]' prefix for pattern in patterns: - cmd.extend(['--exclude-if-present', pattern]) + if pattern.strip(): + cmd.extend(['--exclude-if-present', pattern]) # Add excludes # Partly inspired by borgmatic/borgmatic/borg/create.py