cli: delete directory documents on directory removal
authorJani Nikula <jani@nikula.org>
Fri, 25 Sep 2015 20:48:46 +0000 (23:48 +0300)
committerDavid Bremner <david@tethera.net>
Wed, 14 Oct 2015 10:55:41 +0000 (07:55 -0300)
commite26d99dc7b02f33299c281f97a13deaef802bc7a
tree9b783507b3a2588cbf5bcf0fd6d00f100a55db10
parent727fcd18c6a3897622582e71a2d71081e3ae40ea
cli: delete directory documents on directory removal

There was a problem with the directory documents being left behind when
the filesystem directory was removed. This was worked around in [1].
However, that ignored the fact that the directory documents are also
still listed by notmuch_directory_get_child_directories() leading to
confusing results when running notmuch new. The directory documents are
found and queued for removal over and over again.

Fix the problem for real by removing the directory documents. This fixes
the tests flagged as broken in [2].

The (non-deterministic) hack test from [3] also still passes with this
change.

[1] commit acd66cdec075312944e527febd46382e54d99367
[2] commit ed9ceda623d3f22fb66365b33db63c5c982067d3
[3] id:1441445731-4362-1-git-send-email-jani@nikula.org
notmuch-new.c
test/T050-new.sh