macOS: Use the POSIX user cache dir as the runtime dir

It's path length is 49 chars which is still too long, but it is at least
well defined.
This commit is contained in:
Kovid Goyal
2022-03-13 06:27:41 +05:30
parent ea74add814
commit db00adaf69

View File

@@ -142,7 +142,8 @@ def runtime_dir() -> str:
if 'KITTY_RUNTIME_DIRECTORY' in os.environ:
candidate = os.path.abspath(os.environ['KITTY_RUNTIME_DIRECTORY'])
elif is_macos:
candidate = os.path.join(cache_dir(), 'run')
from .fast_data_types import user_cache_dir
candidate = user_cache_dir()
elif 'XDG_RUNTIME_DIR' in os.environ:
candidate = os.path.abspath(os.environ['XDG_RUNTIME_DIR'])
else: