From: Jani Nikula Date: Sat, 5 Sep 2015 09:35:31 +0000 (+0300) Subject: cli: reset db directory mtime upon directory removal X-Git-Tag: 0.21_rc0~46 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=acd66cdec075312944e527febd46382e54d99367;hp=acd66cdec075312944e527febd46382e54d99367 cli: reset db directory mtime upon directory removal 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 same directory gets added to the filesystem again, the old directory document is found with the old mtime. Reset the directory mtime on removal to avoid problems. The corner case that can hit this problem is renaming directories back and forth. Renaming does not change the mtime of the directory in the filesystem, and thus the old db directory document mtime may match the fs mtime of the directory. The long term fix might be to add a library function to remove a directory document, however this is a much simpler and faster fix for the time being. ---