Fwd: XDG Base directory specification

Richard Boulton richard at tartarus.org
Wed Jun 4 00:10:20 EEST 2003


On Mon, 2003-06-02 at 19:27, Jonathan Blandford wrote:
> I think it should be treated the same if an invalid directory is passed
> in.  Currently that behavior is undefined.  Waldo, can we put something
> in the spec?

I disagree: I think that applications should always present an error to
the user if an invalid directory is specified.
(Though it would be good to define such behaviour in the spec.)

Here's my reasoning:

I can see two possible reasons for the directory being passed in being
invalid: either the user made a mistake (typo, has set permissions
wrong, etc), or the user is trying to disable saving.

If the user has made a mistake, it would be nice to report the problem
to the user.  It would be very confusing if I set XDG_CONFIG_HOME to
"/home/richard/mycongig" by mistake (meaning to set it to
"/home/richard/myconfig"), and an application decided that since
mycongig didn't exist it should use "/home/richard/.config" instead.

If we want to support users disabling saving of configuration options, I
believe there should be a single defined value which does so: since I'm
not sure that leaving it blank is portable, perhaps "NONE".  That way,
an application can be sure that the user wanted saving turned off, and
didn't just make a typo.

-- 
Richard



More information about the xdg mailing list