aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-new.c
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-12 07:02:13 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-11-12 07:02:13 -0800
commite70f09d90076077bdc380814c9a3a0f004432c68 (patch)
tree869658f411cc2798294a37ec35f55a3a322dbda9 /notmuch-new.c
parent091d18c54c046a08bda9d88982601589a1deea37 (diff)
notmuch new: Don't ignore files with mtime of 0.
I recently discovered that mb2md has the annoying bug of creating files with mtime of 0, and notmuch then promptly ignored them, (thinking that its timestamps initialized to 0 were just as new). We fix notmuch to not exclude messages based on a database timestamp of 0.
Diffstat (limited to 'notmuch-new.c')
-rw-r--r--notmuch-new.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/notmuch-new.c b/notmuch-new.c
index 70e55cc7..6247088a 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -167,7 +167,7 @@ add_files_recursive (notmuch_database_t *notmuch,
if (S_ISREG (st->st_mode)) {
/* If the file hasn't been modified since the last
* add_files, then we need not look at it. */
- if (st->st_mtime > path_dbtime) {
+ if (path_dbtime == 0 || st->st_mtime > path_dbtime) {
state->processed_files++;
status = notmuch_database_add_message (notmuch, next, &message);