|
@@ -11,13 +11,15 @@ def collect_config_filenames(config_paths):
|
|
files. This is non-recursive, so any directories within the given directories are ignored.
|
|
files. This is non-recursive, so any directories within the given directories are ignored.
|
|
|
|
|
|
Return paths even if they don't exist on disk, so the user can find out about missing
|
|
Return paths even if they don't exist on disk, so the user can find out about missing
|
|
- configuration paths. However, skip /etc/borgmatic.d if it's missing, so the user doesn't have to
|
|
|
|
- create it unless they need it.
|
|
|
|
|
|
+ configuration paths. However, skip a default config path if it's missing, so the user doesn't
|
|
|
|
+ have to create a default config path unless they need it.
|
|
'''
|
|
'''
|
|
|
|
+ real_default_config_paths = set(map(os.path.realpath, DEFAULT_CONFIG_PATHS))
|
|
|
|
+
|
|
for path in config_paths:
|
|
for path in config_paths:
|
|
exists = os.path.exists(path)
|
|
exists = os.path.exists(path)
|
|
|
|
|
|
- if os.path.realpath(path) in DEFAULT_CONFIG_PATHS and not exists:
|
|
|
|
|
|
+ if os.path.realpath(path) in real_default_config_paths and not exists:
|
|
continue
|
|
continue
|
|
|
|
|
|
if not os.path.isdir(path) or not exists:
|
|
if not os.path.isdir(path) or not exists:
|