Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

site_data_dir is wrong on Kubuntu #121

Open
2xB opened this issue Mar 1, 2019 · 2 comments · May be fixed by #122
Open

site_data_dir is wrong on Kubuntu #121

2xB opened this issue Mar 1, 2019 · 2 comments · May be fixed by #122

Comments

@2xB
Copy link

2xB commented Mar 1, 2019

site_data_dir() returns '/usr/share/plasma', which is a directory of KDE Plasma. Expected would be e.g. '/usr/share' or '/usr/local/share/'. This is because site_data_dir uses $XDG_DATA_DIRS which at least under Kubuntu 18.10 is '/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop'.

2xB added a commit to 2xB/appdirs that referenced this issue Mar 1, 2019
The freedesktop specification states that XDG_DATA_DIRS is a preference ordered list of where data should be searched (as opposed by where applications should store data). Therefore, for multipath=False, which is used by applications to determine a path to store data, this can lead to unintended paths, as can be seen under issue ActiveState#121. This commit changes the default directory in this case to the distribution independent '/usr/local/share'.
2xB added a commit to 2xB/appdirs that referenced this issue Mar 1, 2019
The freedesktop specification states that XDG_DATA_DIRS is a preference ordered list of where data should be searched (as opposed by where applications should store data). Therefore, for multipath=False, which is used by applications to determine a path to store data, this can lead to unintended paths, as can be seen under issue ActiveState#121. This commit changes the default directory in this case to the distribution independent '/usr/local/share'.
2xB added a commit to 2xB/appdirs that referenced this issue Mar 1, 2019
The freedesktop specification states that $XDG_DATA_DIRS is a preference ordered list of where data should be searched (as opposed to where applications should store data). Therefore, for multipath=False, which is used by applications to determine a path to store data, this can lead to unintended paths, as can be seen under issue ActiveState#121. This commit changes the default directory in this case to the distribution independent '/usr/local/share'.
2xB added a commit to 2xB/appdirs that referenced this issue Mar 1, 2019
The freedesktop specification states that $XDG_DATA_DIRS is a preference ordered list of where data should be searched (as opposed to where applications should store data). Therefore, for multipath=False, which is used by applications to determine a path to store data, this can lead to unintended paths, as can be seen under issue ActiveState#121. This commit changes the default directory in this case to the distribution independent '/usr/local/share'.
@2xB
Copy link
Author

2xB commented Mar 1, 2019

Btw. sorry for the amends, I did not realize they show up here. Perhaps it at least brings the reader a smile as they mostly differ in slight commit message language improvements. And particularly sorry for the force-push after the pull request, I did not expect to have made an amend afterwards that would cause it to be a problem. At least there is a lesson learned. ...

@cbm755
Copy link

cbm755 commented Jan 10, 2021

Me too, on Fedora 33 I have:

appdirs.site_data_dir("XXX")                                                     
/home/MYUSER/.local/share/flatpak/exports/share/XXX'

and on command line:

$ echo $XDG_DATA_DIRS
/home/MYUSER/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants