Base Directory Specification - XDG_*_DIRS syntax

Dieter Plaetinck dieter at plaetinck.be
Wed Jan 4 06:04:29 PST 2012


On Wed, 4 Jan 2012 13:57:51 +0000
Simon McVittie <simon.mcvittie at collabora.co.uk> wrote:

> On Mon, 26 Dec 2011 at 21:16:49 -0500, Charles Suprin wrote:
> > Since no-one else has brought this up, there are portability
> > considerations.  There are colons in Windows paths.  The ever famous
> > c:\.  Also old versions of Apple products used to use colons as well
> > for directory separators.
> 
> I believe XDG_DATA_DIRS and XDG_CONFIG_DIRS specifically target Unix:
> they're an attempt to establish conventions for free Unix (Linux,
> *BSD etc.) analogous to those that already exist on Windows and Mac
> OS (as imposed by Microsoft, Apple respectively).
> 
> The GLib accessors for XDG_DATA_DIRS and XDG_CONFIG_DIRS are
> documented in terms of "return an appropriate directory for ...",
> with a note that they obey the basedir spec *on Unix*. They do
> something completely different on Windows, involving the conventional
> Windows directories (C:\Users\me\Application Data and so on).
> 
>     S
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg

':' is an allowed character in paths on Linux. (and other unices?)
it being used as separator in $PATH is AFAIK an age-old bug that luckily doesn't need to be fixed as people are smart enough to not actually use ':' in their paths.

Dieter


More information about the xdg mailing list