]> git.notmuchmail.org Git - notmuch/commitdiff
lib/cli: Make notmuch_database_get_directory return a status code
authorAustin Clements <amdragon@MIT.EDU>
Sun, 13 May 2012 23:36:09 +0000 (19:36 -0400)
committerDavid Bremner <bremner@debian.org>
Tue, 15 May 2012 11:56:33 +0000 (08:56 -0300)
Previously, notmuch_database_get_directory had no way to indicate how
it had failed.  This changes its prototype to return a status code and
set an out-argument to the retrieved directory, like similar functions
in the library API.  This does *not* change its currently broken
behavior of creating directory objects when they don't exist, but it
does document it and paves the way for fixing this.  Also, it can now
check for a read-only database and return
NOTMUCH_STATUS_READ_ONLY_DATABASE instead of crashing.

In the interest of atomicity, this also updates calls from the CLI so
that notmuch still compiles.


No differences found