From: Austin Clements Date: Sun, 13 May 2012 23:36:09 +0000 (-0400) Subject: lib/cli: Make notmuch_database_get_directory return a status code X-Git-Tag: 0.13~8 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=7199d22f4394abdf72ab791fc0aba2c697bf1209;hp=7199d22f4394abdf72ab791fc0aba2c697bf1209;ds=sidebyside lib/cli: Make notmuch_database_get_directory return a status code 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. ---