]> git.notmuchmail.org Git - notmuch/commitdiff
lib: Make notmuch_database_get_directory return NULL if the directory is not found
authorAustin Clements <amdragon@MIT.EDU>
Fri, 18 May 2012 04:13:37 +0000 (00:13 -0400)
committerDavid Bremner <bremner@debian.org>
Thu, 24 May 2012 01:30:55 +0000 (22:30 -0300)
Using the new support from _notmuch_directory_create, this makes
notmuch_database_get_directory a read-only operation that simply
returns the directory object if it exists or NULL otherwise.  This
also means that notmuch_database_get_directory can work on read-only
databases.

This change breaks the directory mtime workaround in notmuch-new.c by
fixing the exact issue it was working around.  This permits mtime
update races to prevent scans of changed directories, which
non-deterministically breaks a few tests.  The next patch fixes this.


No differences found