aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-config.c
diff options
context:
space:
mode:
authorGravatar David Bremner <david@tethera.net>2014-01-27 10:12:12 -0400
committerGravatar David Bremner <david@tethera.net>2014-04-08 07:27:14 -0300
commitaf5c3afa91cc29268c6754ea70f15cae30f22403 (patch)
treecc1fe830310c9debb7de0a19f707c06858479697 /notmuch-config.c
parent134dbadaf517c6962c2588f36f1f8782277e2f95 (diff)
compat: add canonicalize_file_name
the POSIX 2008 behaviour of realpath is not available everywhere so we provide a simple wrapper function. We use (and provide) the gnu extension canonicalize_file_name to make it cleaner to test for the feature we need; otherwise we have to rely on realpath segfaulting if the second argument is null.
Diffstat (limited to 'notmuch-config.c')
-rw-r--r--notmuch-config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/notmuch-config.c b/notmuch-config.c
index 8d286538..4886d366 100644
--- a/notmuch-config.c
+++ b/notmuch-config.c
@@ -454,7 +454,7 @@ notmuch_config_save (notmuch_config_t *config)
}
/* Try not to overwrite symlinks. */
- filename = realpath (config->filename, NULL);
+ filename = canonicalize_file_name (config->filename);
if (! filename) {
if (errno == ENOENT) {
filename = strdup (config->filename);