cli: config: do not overwrite symlinks when saving config file
authorJani Nikula <jani@nikula.org>
Sun, 7 Apr 2013 17:15:03 +0000 (20:15 +0300)
committerDavid Bremner <bremner@debian.org>
Sun, 14 Apr 2013 21:38:07 +0000 (18:38 -0300)
commit58ed67992d0ec1fa505026105218fa449f7980b0
tree91cbf5686c6260b6718f04b9ddeb08cde2747249
parent7defbcdcec8bd89723dcd3548d2bfc7d58f0275d
cli: config: do not overwrite symlinks when saving config file

Use realpath to canonicalize the config path before writing.

Previously 'notmuch setup' and 'notmuch config set' overwrote the
config file even if it was a symbolic link.
notmuch-config.c
test/config