Closed joanbm closed 1 month ago
Note that this fixes somewhat of a regression:
In r2.18 the default for XDG_DATA_DIRS
was the same, but it did also reverse the directories when adding them to the search path which cancelled out the problem. So, in r2.18 the order was correct when XDG_DATA_DIRS
was empty or unset, but incorrect when XDG_DATA_DIRS
was explicitly specified.
For r3.0+ there were a lot of refactors which removed the calls to reverse the directories. So, in r3.0+ the order is incorrect when XDG_DATA_DIRS
is empty or unset, but correct when XDG_DATA_DIRS
is explicitly specified. And the only thing that was left to fix is to use the correct default for XDG_DATA_DIRS
according to the spec.
Administrator-owned .desktop files in /usr/local/share/applications/ should be able to override system files in /usr/share/applications/, if no XDG_DATA_DIRS is given. However,
get_search_paths
returned them in the opposite order, so that system .desktop files took precedence.This is confirmed by the XDG Base Directory Specification:
Use the correct default so administrator-owned files take precedence.