]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Added support for the XDG specification
authorOndřej Lysoněk <olysonek@redhat.com>
Tue, 2 Aug 2016 13:12:43 +0000 (15:12 +0200)
committerSimon Tatham <anakin@pobox.com>
Mon, 8 Aug 2016 19:37:07 +0000 (20:37 +0100)
commit9952b2d5bd5c8fbac4f5731a805bce10fe4ce47c
tree20e716ec32c237259fefc37561199081db5706ad
parent23a02f429c0449e7d81c740271aa0c4790b7f140
Added support for the XDG specification

The XDG configuration location ($XDG_CONFIG_HOME/putty, or
~/.config/putty) is now prefered over the old ~/.putty location, if the
XDG location already exists. If it doesn't exist, we try to use one of
the old locations ($HOME/.putty, [/etc/passwd home]/.putty, /.putty). If
none of the directories exist, we fall back to ~/.config/putty or
~/.putty, if the XDG_DEFAULT macro is defined or not, respectively. The
PUTTYDIR environment variable remains a definitive override of the
configuration location. This all ensures that the old location is still
used, unless the user explicitly requests otherwise.

The configuration directories are created using the make_dir_path()
function, to ensure that saving the configuration doesn't fail e.g.
because of a non-existent ~/.config directory.
unix/uxstore.c