Re: Question regarding $XDG_DATA_DIRS
Lennart Poettering <[email protected]> Sun, 16 Oct 2022 17:16:20 +0200
| Newsgroups | gmane.linux.xdg.devel |
|---|---|
| Message-ID | <Y0wgRD/YvNtvmRkm@gardel-login> |
On Do, 13.10.22 00:56, Akbarkhon Variskhanov ([email protected]) wrote: > Hi. > > I noticed that the default value has a trailing slash for both directories: > > > If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used. > > I was wondering what's the benefit of including a trailing slash? Is > there a specific purpose to it or is it a typo? With all due respect, > it looks so out of place. Path-related variables usually strip it off. > > Sorry if I'm asking in the wrong place. Behaviour should be the same, hence it doesn't matter. Note that the root dir "/" necessarily ends in a slash, so it might make sense to always suffix dirs like that, to make the root dir less special. In systemd documentation we have the rule to always suffix dirs with "/", to communicate that they are dirs. But seriously, whether to suffix dirs or not, effect is the same. And to some level it's a bikeshedding questions wether to suffix or not. Lennart -- Lennart Poettering, Berlin