diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-11-09 13:51:39 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-11-09 13:51:39 +0100 |
| commit | 43fabacd956b03d15e621de2c026c9f59db57025 (patch) | |
| tree | 0ed9af40b02b50ba998c68ba7903039ea2bde404 /tidal_dl_ng/helper/path.py | |
| parent | 558dfa65cc1b976628b04485eb81525929f4e6c1 (diff) | |
| download | tidal-dl-ng-43fabacd956b03d15e621de2c026c9f59db57025.tar.gz | |
Respect user specified config directory. Fixes #141
Diffstat (limited to 'tidal_dl_ng/helper/path.py')
| -rw-r--r-- | tidal_dl_ng/helper/path.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index c00ddfd..09aa899 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -26,7 +26,10 @@ def path_home() -> str: def path_config_base() -> str: - path_config: str = os.environ.get("XDG_CONFIG_HOME", ".config") + # https://wiki.archlinux.org/title/XDG_Base_Directory + # X11 workaround: If user specified config path is set, do not point to "~/.config" + path_user_custom: str = os.environ.get("XDG_CONFIG_HOME", "") + path_config: str = ".config" if not path_user_custom else "" path_base: str = os.path.join(path_home(), path_config, __name_display__) return path_base |
