aboutsummaryrefslogtreecommitdiff
path: root/lib/database.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-02-02 16:43:58 -0400
committerDavid Bremner <david@tethera.net>2021-03-20 07:23:40 -0300
commit6251e2bb9ee023d25b58384c8a49576086fdaba3 (patch)
treedfec27a8a13bc9f02b9467330cba6361b2a48370 /lib/database.cc
parent1383481d4a7cee3b59f354a203090c966a2a635e (diff)
lib: remove "path" from notmuch struct
This removes duplication between the struct element and the configuration string_map entry. Create a simple wrapper for setting the database path that makes sure the trailing / is stripped.
Diffstat (limited to 'lib/database.cc')
-rw-r--r--lib/database.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/database.cc b/lib/database.cc
index fc13b53b..580b2d58 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -752,7 +752,7 @@ notmuch_database_destroy (notmuch_database_t *notmuch)
const char *
notmuch_database_get_path (notmuch_database_t *notmuch)
{
- return notmuch->path;
+ return notmuch_config_get (notmuch, NOTMUCH_CONFIG_DATABASE_PATH);
}
unsigned int