add_files_state->renamed_messages++;
if (add_files_state->synchronize_flags == TRUE)
notmuch_message_maildir_flags_to_tags (message);
add_files_state->renamed_messages++;
if (add_files_state->synchronize_flags == TRUE)
notmuch_message_maildir_flags_to_tags (message);
/* Recursively remove all filenames from the database referring to
* 'path' (or to any of its children). */
/* Recursively remove all filenames from the database referring to
* 'path' (or to any of its children). */
_remove_directory (void *ctx,
notmuch_database_t *notmuch,
const char *path,
add_files_state_t *add_files_state)
{
_remove_directory (void *ctx,
notmuch_database_t *notmuch,
const char *path,
add_files_state_t *add_files_state)
{
notmuch_directory_t *directory;
notmuch_filenames_t *files, *subdirs;
char *absolute;
notmuch_directory_t *directory;
notmuch_filenames_t *files, *subdirs;
char *absolute;
{
absolute = talloc_asprintf (ctx, "%s/%s", path,
notmuch_filenames_get (files));
{
absolute = talloc_asprintf (ctx, "%s/%s", path,
notmuch_filenames_get (files));
{
absolute = talloc_asprintf (ctx, "%s/%s", path,
notmuch_filenames_get (subdirs));
{
absolute = talloc_asprintf (ctx, "%s/%s", path,
notmuch_filenames_get (subdirs));
- _remove_directory (ctx, notmuch, absolute, add_files_state);
+ status = _remove_directory (ctx, notmuch, absolute, add_files_state);
gettimeofday (&tv_start, NULL);
for (f = add_files_state.removed_files->head; f && !interrupted; f = f->next) {
gettimeofday (&tv_start, NULL);
for (f = add_files_state.removed_files->head; f && !interrupted; f = f->next) {
gettimeofday (&tv_start, NULL);
for (f = add_files_state.removed_directories->head, i = 0; f && !interrupted; f = f->next, i++) {
gettimeofday (&tv_start, NULL);
for (f = add_files_state.removed_directories->head, i = 0; f && !interrupted; f = f->next, i++) {
- _remove_directory (ctx, notmuch, f->filename, &add_files_state);
+ ret = _remove_directory (ctx, notmuch, f->filename, &add_files_state);
+ if (ret)
+ goto DONE;