Skip to content

Commit c833079

Browse files
[lfs] Only check XDG_CONFIG_HOME when not on 'Windows'
When running legendary through Wine and `XDG_CONFIG_HOME` is set in the environment, `config_path` resolves to the absolute path to the Linux config directory. Wine in turn resolves the path in the way that Legendary uses the existing Linux host config directory instead of creating/using the one under Wine prefix in `%USERPROFILE%\.config`
1 parent 3963382 commit c833079

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

legendary/lfs/lgndry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, config_file=None):
2828

2929
if config_path := os.environ.get('LEGENDARY_CONFIG_PATH'):
3030
self.path = config_path
31-
elif config_path := os.environ.get('XDG_CONFIG_HOME'):
31+
elif os.name != 'nt' and (config_path := os.environ.get('XDG_CONFIG_HOME')):
3232
self.path = os.path.join(config_path, 'legendary')
3333
else:
3434
self.path = os.path.expanduser('~/.config/legendary')

0 commit comments

Comments
 (0)