mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-18 09:15:56 +01:00
notmuch new: Avoid updating directory timestamp if interrupted.
This was a very dangerous bug. An interrupted "notmuch new" session would still update the timestamp for the directory in the database. This would result in mail files that were not processed due to the original interruption *never* being picked up by future runs of "notmuch new". Yikes!
This commit is contained in:
parent
999f4c895c
commit
29908b9f13
1 changed files with 5 additions and 3 deletions
|
@ -290,9 +290,11 @@ add_files_recursive (notmuch_database_t *notmuch,
|
|||
next = NULL;
|
||||
}
|
||||
|
||||
status = notmuch_directory_set_mtime (directory, path_mtime);
|
||||
if (status && ret == NOTMUCH_STATUS_SUCCESS)
|
||||
ret = status;
|
||||
if (! interrupted) {
|
||||
status = notmuch_directory_set_mtime (directory, path_mtime);
|
||||
if (status && ret == NOTMUCH_STATUS_SUCCESS)
|
||||
ret = status;
|
||||
}
|
||||
|
||||
DONE:
|
||||
if (next)
|
||||
|
|
Loading…
Reference in a new issue