summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorexislow <exislow@users.noreply.github.com>2024-11-09 13:53:10 +0100
committerGitHub <noreply@github.com>2024-11-09 13:53:10 +0100
commite4578cf257f652f01bcd29b4e094b43c1f575de7 (patch)
tree0ed9af40b02b50ba998c68ba7903039ea2bde404
parent99e8c5f32752510a8ec6ef6f0ebdfe32a59e1cb8 (diff)
parent43fabacd956b03d15e621de2c026c9f59db57025 (diff)
downloadtidal-dl-ng-e4578cf257f652f01bcd29b4e094b43c1f575de7.tar.gz
Merge pull request #216 from exislow/141-bug-when-xdg_config_home-set-config-dir-is-ignored-and-new-config-generated-in-configconfigtidal_dl_ng
141 bug when xdg config home set config dir is ignored and new config generated in configconfigtidal dl ng
-rw-r--r--tidal_dl_ng/helper/path.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py
index bc1fb6d..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 = ".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