diff --git a/borgmatic/config/collect.py b/borgmatic/config/collect.py index 02ccc9dc..3cc9699b 100644 --- a/borgmatic/config/collect.py +++ b/borgmatic/config/collect.py @@ -31,6 +31,7 @@ def collect_config_filenames(config_paths): continue for filename in os.listdir(path): - full_filename = os.path.join(path, filename) - if not os.path.isdir(full_filename): - yield full_filename + if not filename.endswith('~'): + full_filename = os.path.join(path, filename) + if not os.path.isdir(full_filename): + yield full_filename