File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,10 @@ def get_config_dir():
35
35
"""
36
36
Return tmuxp configuration directory.
37
37
38
- ``TMUXP_CONFIGDIR`` environmental variable has precedence, then XDG default
39
- directory is checked, either from XDG_CONFIG_HOME environmental variable or
40
- its default, then the old default ~/.tmuxp is returned for compatibility.
38
+ ``TMUXP_CONFIGDIR`` environmental variable has precedence if set and not
39
+ empty. We also honor XDG default directory, evaluating from XDG_CONFIG_HOME
40
+ environmental variable if set and not empty or its default. Then the old
41
+ default ~/.tmuxp is returned for compatibility.
41
42
42
43
Returns
43
44
-------
@@ -46,9 +47,9 @@ def get_config_dir():
46
47
"""
47
48
48
49
paths = []
49
- if 'TMUXP_CONFIGDIR' in os .environ :
50
+ if 'TMUXP_CONFIGDIR' in os .environ and os . environ [ 'TMUX_CONFIGDIR' ] :
50
51
paths .append (os .environ ['TMUXP_CONFIGDIR' ])
51
- if 'XDG_CONFIG_HOME' in os .environ :
52
+ if 'XDG_CONFIG_HOME' in os .environ and os . environ [ 'XDG_CONFIG_HOME' ] :
52
53
paths .append (os .environ ['XDG_CONFIG_HOME' ])
53
54
else :
54
55
paths .append ('~/.config/tmuxp/' )
You can’t perform that action at this time.
0 commit comments