Jani Nikula <jani@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