X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lib%2Fdirectory.cc;h=eaba65ab60c7bf656809e23e1c805269d274b1c5;hb=d7d4c729ab3b74eaaebe64cb8c7383b0ea06cec0;hp=09b49245e94468c9dae27d7425e6426249bb9189;hpb=c73d510f965cddf4cf45f9895c45fb818519e200;p=notmuch 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);