]> git.notmuchmail.org Git - notmuch/commit
lib: Make directory document creation optional for _notmuch_directory_create
authorAustin Clements <amdragon@MIT.EDU>
Fri, 18 May 2012 04:13:34 +0000 (00:13 -0400)
committerDavid Bremner <bremner@debian.org>
Thu, 24 May 2012 01:30:20 +0000 (22:30 -0300)
commitf69314fbd37f403a395b7c1c44595c8f696b05b7
tree1d533e466d14fd0c886fff2622e3ffd4895f2a4e
parent70ca3444c75beaa693fcac411dd6a2819bd4341e
lib: Make directory document creation optional for _notmuch_directory_create

Previously this function would create directory documents if they
didn't exist.  As a result, it could only be used on writable
databases.  This adds an argument to make creation optional and to
make this function work on read-only databases.  We use a flag
argument to avoid a bare boolean and to permit future expansion.

Both callers have been updated, but currently retain the old behavior.
We'll take advantage of the new argument in the following patches.
lib/database.cc
lib/directory.cc
lib/notmuch-private.h