File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -168,12 +168,11 @@ def user_desktop_dir(self) -> str:
168
168
@property
169
169
def user_runtime_dir (self ) -> str :
170
170
"""
171
- :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
172
- ``$XDG_RUNTIME_DIR/$appname/$version``.
171
+ :return: runtime directory tied to the user, e.g. ``$XDG_RUNTIME_DIR/$appname/$version``.
173
172
174
- For FreeBSD/OpenBSD/NetBSD , it would return ``/var/run/user/$(id -u)/$appname/$version`` if
175
- exists, otherwise ``/tmp/runtime- $(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR``
176
- is not set .
173
+ If ``$XDG_RUNTIME_DIR`` is unset , it tries the platform default location of that runtime directory
174
+ ( ``/var/run/user/ $(id -u)`` on FreeBSD/OpenBSD/NetBSD, ``/run/user/$(id -u)`` otherwise).
175
+ If the default location is not writable, it uses a temporary directory instead .
177
176
"""
178
177
path = os .environ .get ("XDG_RUNTIME_DIR" , "" )
179
178
if path .strip ():
You can’t perform that action at this time.
0 commit comments