89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
10.15k stars 419 forks source link

export: Actually fix XDG_DATA_DIRS and XDG_DATA_HOME handling #1582

Closed TigerGorilla2 closed 1 month ago

TigerGorilla2 commented 1 month ago

This fixes the use of XDG_DATA_DIRS and XDG_DATA_HOME in accordance to the specification. As per the specification

There is a set of preference ordered base directories relative to which data files should be searched. This set of directories is defined by the environment variable $XDG_DATA_DIRS.

and

There is a single base directory relative to which user-specific data files should be written. This directory is defined by the environment variable $XDG_DATA_HOME.

This change now uses the correct fallbacks for each variable (was swapped) and does not try to iterate over XDG_DATA_HOME as it should only contain a single directory.

89luca89 commented 1 month ago

Thanks @TigerGorilla2 LGTM!