Skip to content

v0.5.2

Compare
Choose a tag to compare
@adrg adrg released this 29 Oct 13:43
· 6 commits to master since this release
2335a68

Changelog

  • Updated logic of xdg.RuntimeFile: due to the special nature of the runtime directory, the function no longer attempts to create it if it does not exist. If that's the case, the function uses the operating system's temporary directory as a fallback. The function still creates subdirectories relative to the base runtime directory or its fallback.

    Justification: the creation of the runtime directory is not in the scope of this package as it has special requirements defined by the XDG Base Directory Specification. Relevant excerpt:

    The lifetime of the directory MUST be bound to the user being logged in. It MUST be created when the user first logs in and if the user fully logs out the directory MUST be removed. If the user logs in more than once they should get pointed to the same directory, and it is mandatory that the directory continues to exist from their first login to their last logout on the system, and not removed in between. Files in the directory MUST not survive reboot or a full logout/login cycle.

    Also, on Linux, the parent directories of the default user runtime directory are owned by the root user so they cannot be created by a regular user. pam_systemd is usually responsible for creating the runtime directory (/run/user/$UID).