From d79ea56c0f7445ba7d833c37e5167c2adaf895d3 Mon Sep 17 00:00:00 2001 From: Fuxino Date: Thu, 8 Oct 2026 18:03:18 +0200 Subject: [PATCH] Ignore whitespace around comma-separated config values 'inputs=/a, /b' was read as '/a' and ' /b', so /b was skipped, and excluded patterns with spaces around them never matched. Strip whitespace from each value, and ignore empty exclude entries. --- simple_backup/simple_backup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simple_backup/simple_backup.py b/simple_backup/simple_backup.py index e11c9b0..1a289b8 100755 --- a/simple_backup/simple_backup.py +++ b/simple_backup/simple_backup.py @@ -753,7 +753,7 @@ def _read_config(config_file, user: Optional[str] = None): section = 'default' inputs = config.get(section, 'inputs') - inputs = inputs.split(',') + inputs = [i.strip() for i in inputs.split(',')] inputs = _expand_inputs(inputs, user) inputs = list(set(inputs)) @@ -770,7 +770,7 @@ def _read_config(config_file, user: Optional[str] = None): try: exclude = config.get(section, 'exclude') - exclude = exclude.split(',') + exclude = [e.strip() for e in exclude.split(',') if e.strip() != ''] except configparser.NoOptionError: exclude = []