mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-08 21:25:32 +02:00
Use realpath when creating the kitty config directory
Some people make it a symlink to non-existent paths. See #7607
This commit is contained in:
@@ -116,7 +116,7 @@ def _get_config_dir() -> str:
|
||||
candidate = os.path.abspath(os.path.expanduser(os.environ.get('XDG_CONFIG_HOME') or '~/.config'))
|
||||
ans = os.path.join(candidate, appname)
|
||||
try:
|
||||
os.makedirs(ans, exist_ok=True)
|
||||
os.makedirs(os.path.realpath(ans), exist_ok=True)
|
||||
except FileExistsError:
|
||||
raise SystemExit(f'A file {ans} already exists. It must be a directory, not a file.')
|
||||
except PermissionError:
|
||||
|
||||
Reference in New Issue
Block a user