diff options
| author | Đoàn Trần Công Danh <congdanhqx@gmail.com> | 2021-04-24 08:05:37 +0700 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-04-24 08:07:00 -0300 |
| commit | 441a327051f5357175029709030a0ee51131379d (patch) | |
| tree | fcb47d140f922b4036f0f763e25ede21b0783c3c /notmuch-config.c | |
| parent | 62f03b6ab86bdc378198f9c1a86cb51ead289961 (diff) | |
compat: rename {,notmuch_}canonicalize_file_name
When compat canonicalize_file_name was introduced, it was limited to
C code only because it was used by C code only during that time.
>From 5ec6fd4d, (lib/open: check for split configuration when creating
database., 2021-02-16), lib/open.cc, which is C++, relies on the
existent of canonicalize_file_name.
However, we can't blindly enable canonicalize_file_name for C++ code,
because different implementation has different additional signature for
C++ and users can arbitrarily add -DHAVE_CANONICALIZE_FILE_NAME=0 to
{C,CXX}FLAGS.
Let's move our implementation into a util library.
Helped-by: Tomi Ollila <tomi.ollila@iki.fi>
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Diffstat (limited to 'notmuch-config.c')
| -rw-r--r-- | notmuch-config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch-config.c b/notmuch-config.c index 16e86916..d9390c4d 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -24,6 +24,7 @@ #include <netdb.h> #include <assert.h> +#include "path-util.h" #include "unicode-util.h" static const char toplevel_config_comment[] = @@ -327,7 +328,7 @@ notmuch_conffile_save (notmuch_conffile_t *config) } /* Try not to overwrite symlinks. */ - filename = canonicalize_file_name (config->filename); + filename = notmuch_canonicalize_file_name (config->filename); if (! filename) { if (errno == ENOENT) { filename = strdup (config->filename); |
