-
-
Notifications
You must be signed in to change notification settings - Fork 73
Description
The user_runtime_dir method on unix systems other than several BSDs defaults to /run/user/{uid} even if that directory doesn't exist or isn't writable.
This was first discovered by Mozilla and reported here: canonical/craft-application#869
What the XDG Base Directory Specification says to do when it's unset is:
If
$XDG_RUNTIME_DIRis not set applications should fall back to a replacement directory with similar capabilities and print a warning message. Applications should use this directory for communication and synchronization purposes and should not place larger files in it, since it might reside in runtime memory and cannot necessarily be swapped out to disk.
The issue here is that platformdirs is not necessarily checking that the fallback directory is valid.
I'm preparing a PR about it :-)