[PATCH 2/3] lib: add interface to delete directory documents

David Bremner david at tethera.net
Mon Sep 28 04:42:24 PDT 2015


Jani Nikula <jani at nikula.org> writes:

>
> XXX: Should this also remove the files under it, or assume that's been
> done by the caller? Should this incorporate some or all of the
> functionality of _remove_directory() in notmuch-new.c?

1) The top level _remove_directory function does seem to make sense in
  the lib, however
2) it calls remove_filename, which reads and writes add_files_state in
  pseudo-OO style.
3) In particular it needs to read synchronize_flags, and write
  renamed_messages and removed_messages.
  
I guess one solution would be to pass through three arguments. A fancier
version would be to pass in a "visitor" function and closure pointer.

The cowardly solution would be to point at POSIX rmdir, and leave the
discussion immediately above for the future.

d



More information about the notmuch mailing list