You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe appdirs does not conform to the XDG spec when environment variables exist, but are empty.
The XDG spec says:
If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.
However, the implementation here uses path = os.getenv('XDG_DATA_HOME', os.path.expanduser("~/.local/share")), which is correct when the environment variable does not exist, but incorrect when it exists but is empty.
I believe
appdirs
does not conform to the XDG spec when environment variables exist, but are empty.The XDG spec says:
However, the implementation here uses
path = os.getenv('XDG_DATA_HOME', os.path.expanduser("~/.local/share"))
, which is correct when the environment variable does not exist, but incorrect when it exists but is empty.I propose a helper function like
and using that wherever
os.getenv
is currently used.This is a breaking change, but necessary for conformance with the XDG spec.
The text was updated successfully, but these errors were encountered: