mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-26 07:53:58 +00:00
get_config_dir: legacy=False default
This commit is contained in:
parent
ebcda6f0a5
commit
b06dd1c66c
2 changed files with 7 additions and 2 deletions
|
@ -130,7 +130,7 @@ def get_cache_dir(*, legacy=False):
|
|||
return cache_dir
|
||||
|
||||
|
||||
def get_config_dir(*, legacy=True):
|
||||
def get_config_dir(*, legacy=False):
|
||||
"""Determine where to store whole config"""
|
||||
|
||||
# Get config home path
|
||||
|
|
|
@ -614,7 +614,12 @@ def test_get_config_dir(monkeypatch):
|
|||
monkeypatch.delenv("BORG_BASE_DIR", raising=False)
|
||||
if is_win32:
|
||||
monkeypatch.delenv("BORG_CONFIG_DIR", raising=False)
|
||||
assert get_config_dir(legacy=False) == os.path.join(os.path.expanduser("~"), "AppData", "Local", "borg", "borg")
|
||||
assert get_config_dir() == os.path.join(os.path.expanduser("~"), "AppData", "Local", "borg", "borg")
|
||||
elif is_darwin:
|
||||
monkeypatch.delenv("BORG_CONFIG_DIR", raising=False)
|
||||
assert get_config_dir() == os.path.join(os.path.expanduser("~"), "Library", "Preferences", "borg")
|
||||
monkeypatch.setenv("BORG_CONFIG_DIR", "/var/tmp")
|
||||
assert get_config_dir() == "/var/tmp"
|
||||
else:
|
||||
monkeypatch.delenv("XDG_CONFIG_HOME", raising=False)
|
||||
monkeypatch.delenv("BORG_CONFIG_DIR", raising=False)
|
||||
|
|
Loading…
Reference in a new issue