X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-new.c;h=33645349cd5fd8abdb5936e185b5f5c70d529c08;hp=514e06a4d1f31326a805d1cabef4fb6631ab4b9d;hb=acd66cdec075312944e527febd46382e54d99367;hpb=9a5143abbcfbb008f846329b5c50b9322af5322a diff --git a/notmuch-new.c b/notmuch-new.c index 514e06a4..33645349 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -878,6 +878,15 @@ _remove_directory (void *ctx, goto DONE; } + /* + * XXX: The library does not have a function to remove a directory + * document for a path. Usually this doesn't matter except for a + * slight waste of space. However, if the directory gets added to + * the filesystem again, the old directory document is found with + * the old mtime. Reset the directory mtime to avoid problems. + */ + notmuch_directory_set_mtime (directory, 0); + DONE: notmuch_directory_destroy (directory); return status;