]> git.notmuchmail.org Git - notmuch/commit
cli: consider files vanishing during notmuch new non-fatal
authorJani Nikula <jani@nikula.org>
Mon, 21 Nov 2016 20:14:33 +0000 (22:14 +0200)
committerDavid Bremner <david@tethera.net>
Sat, 26 Nov 2016 01:09:32 +0000 (21:09 -0400)
commitf5185881f7b01f67b5b64218804749b733f08d44
treef640a2dcaffa6b9b2337133c69bc2fdcf647cbd7
parent3891d6cb98ebd9940d947d963e0528cc2db9a752
cli: consider files vanishing during notmuch new non-fatal

If some software other than notmuch new renames or removes files
during the notmuch new scan (specifically after scandir but before
indexing the file), keep going instead of bailing out. Failing to
index the file is just a race condition between notmuch and the other
software; the rename could happen after the notmuch new scan
anyway. It's not fatal, and we'll catch the renamed files on the next
scan.

Add a new exit code for when files vanished, so the caller has a
chance to detect the race and re-run notmuch new to recover.

Reported by Paul Wise <pabs@debian.org> at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843127
notmuch-client.h
notmuch-new.c