]> git.notmuchmail.org Git - notmuch/commit
notmuch new: Scan directory whenever fs mtime is not equal to db mtime
authorCarl Worth <cworth@cworth.org>
Sun, 5 Dec 2010 09:40:16 +0000 (01:40 -0800)
committerCarl Worth <cworth@cworth.org>
Sun, 5 Dec 2010 09:40:16 +0000 (01:40 -0800)
commit73198f5c7409e530279f5dd2d4caa415358e8237
treefaec3750233dee49452d964a2a2a3d73878dc851
parentc7b4d15d0ad78b6f28b50310358ae255e6a08008
notmuch new: Scan directory whenever fs mtime is not equal to db mtime

Previously, we would only scan a directory if the filesystem
modification time was strictly newer than the database modification
time for the directory. This would cause a problem for systems with an
unstable clock, (if a new mail was added to the filesystem, then the
system clock rolled backward, "notmuch new" would not find the message
until the clock caught up and the directory was modified again).

Now, we always scan the directory if the modification time of the
directory is not exactly the same between the filesystem and the
database. This avoids the problem described above even with an
unstable system clock.
notmuch-new.c