static void
handle_sigint (unused (int sig))
{
- ssize_t ignored;
-
static char msg[] = "Stopping... \n";
- ignored = write(2, msg, sizeof(msg)-1);
+ write(2, msg, sizeof(msg)-1);
interrupted = 1;
}
notmuch_messages_t *messages;
notmuch_message_t *message;
struct sigaction action;
+ notmuch_bool_t synchronize_flags;
int i;
/* Setup our handler for SIGINT */
NOTMUCH_DATABASE_MODE_READ_WRITE);
if (notmuch == NULL)
return 1;
- notmuch_database_set_maildir_sync (notmuch,
- notmuch_config_get_maildir_sync (config));
+
+ synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config);
query = notmuch_query_create (notmuch, query_string);
if (query == NULL) {
notmuch_message_thaw (message);
+ if (synchronize_flags)
+ notmuch_message_tags_to_maildir_flags (message);
+
notmuch_message_destroy (message);
}