aboutsummaryrefslogtreecommitdiff
path: root/lib/directory.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-07-26 20:31:35 -0300
committerDavid Bremner <david@tethera.net>2020-07-28 08:47:58 -0300
commitd7d4c729ab3b74eaaebe64cb8c7383b0ea06cec0 (patch)
tree7edbc7c31d5eebfc33349e5edc8baf7cd4c6797f /lib/directory.cc
parentc73d510f965cddf4cf45f9895c45fb818519e200 (diff)
lib: encapsulate the use of notmuch_database_t field 'mode'
The plan is to change the underlying representation.
Diffstat (limited to 'lib/directory.cc')
-rw-r--r--lib/directory.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/directory.cc b/lib/directory.cc
index 09b49245..eaba65ab 100644
--- a/lib/directory.cc
+++ b/lib/directory.cc
@@ -114,7 +114,7 @@ _notmuch_directory_find_or_create (notmuch_database_t *notmuch,
path = _notmuch_database_relative_path (notmuch, path);
- if (create && notmuch->mode == NOTMUCH_DATABASE_MODE_READ_ONLY)
+ if (create && _notmuch_database_mode (notmuch) == NOTMUCH_DATABASE_MODE_READ_ONLY)
INTERNAL_ERROR ("Failure to ensure database is writable");
directory = talloc (notmuch, notmuch_directory_t);