-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
The functions env_get_runtime_path and check_runtime_path look like they are intended to create $XDG_RUNTIME_DIR, if it is defined but doesn't exist, but actually fail to do so. The code only uses XDG_RUNTIME_DIR if the directory already exists, and already has the correct access mode. It then silently falls back to the /tmp/fish.$USER that I was trying to avoid.
The problem is that
a) env_get_runtime_path checks access before calling check_runtime_path; this prevents the directory being created. It is also redundant because check_runtime_path will check access anyway.
b) there's no warning or explanation why it's ignoring the user configured directory.
(I discovered this because fish from LinuxBrew appears to be incapable of obtaining my username from QAS on an ancient Ubuntu 14.04 system, meaning that the fallback method doesn't work either. I don't expect this to be a common problem for others. It took a fair amount of searching and code inspection to figure out how to work around the problem.)