]> git.notmuchmail.org Git - notmuch/commit
new: Improved workaround for mistaken new directories
authorAustin Clements <amdragon@MIT.EDU>
Wed, 29 Jun 2011 23:00:01 +0000 (19:00 -0400)
committerCarl Worth <cworth@cworth.org>
Wed, 29 Jun 2011 23:10:41 +0000 (16:10 -0700)
commitbb2b33fbb85b88eb7d3bedf4cb261a89da20f504
treed3e23d9cb9a2d427e67fadf55ab0ac38b6a38802
parenta31ad0bd01570307d18b7fbd56b7bcdfb22e5b63
new: Improved workaround for mistaken new directories

Currently, notmuch new assumes any directory with a database mtime of
0 is new, but we don't set the mtime until after processing messages
and subdirectories in that directory.  Hence, anything that prevents
the mtime update (such as an interruption or the wall-clock logic
introduced in 8c39e8d6) will cause the next notmuch new to think the
directory is still new.

We work around this by setting the new directory's database mtime to
-1 before scanning anything in the new directory.  This also obviates
the need for the workaround used in 8c39e8d6.
notmuch-new.c