aboutsummaryrefslogtreecommitdiff
path: root/lib/config.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-02-17 11:04:54 -0400
committerDavid Bremner <david@tethera.net>2021-03-20 07:51:36 -0300
commita7873df331bcd53dd1bc8da95c4279163437cc13 (patch)
tree4713a9deb8323509023dd2f091aa0eb85280c809 /lib/config.cc
parente3a4abc513d314cf7550d43fdcba458421a2daac (diff)
lib/config: add configuration variable for backup directory
Like the hook directory, we primarily need a way to communicate this directory between various components, but we may as well let the user configure it. Most of the diff is generalizing choose_hook_dir to work for both backup and hook directories.
Diffstat (limited to 'lib/config.cc')
-rw-r--r--lib/config.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/config.cc b/lib/config.cc
index f2060e28..8bd3c35a 100644
--- a/lib/config.cc
+++ b/lib/config.cc
@@ -410,6 +410,8 @@ _notmuch_config_key_to_string (notmuch_config_key_t key)
return "database.mail_root";
case NOTMUCH_CONFIG_HOOK_DIR:
return "database.hook_dir";
+ case NOTMUCH_CONFIG_BACKUP_DIR:
+ return "database.backup_dir";
case NOTMUCH_CONFIG_EXCLUDE_TAGS:
return "search.exclude_tags";
case NOTMUCH_CONFIG_NEW_TAGS:
@@ -453,6 +455,7 @@ _notmuch_config_default (notmuch_database_t *notmuch, notmuch_config_key_t key)
case NOTMUCH_CONFIG_SYNC_MAILDIR_FLAGS:
return "true";
case NOTMUCH_CONFIG_HOOK_DIR:
+ case NOTMUCH_CONFIG_BACKUP_DIR:
case NOTMUCH_CONFIG_NEW_IGNORE:
case NOTMUCH_CONFIG_USER_NAME:
case NOTMUCH_CONFIG_PRIMARY_EMAIL: