X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-restore.c;h=f095f64a76b7054dbda62b1fd8f9f4efa975117b;hp=b5c5c48dfdc4f3be5f023d946900e7c22c42a3cc;hb=59a9c36316293b161528097a73c72d5f5ed58781;hpb=d9d3d3e6f06a76dc0fbe24c9655b64acfcd4b9e4 diff --git a/notmuch-restore.c b/notmuch-restore.c index b5c5c48d..f095f64a 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -25,6 +25,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[]) { notmuch_config_t *config; notmuch_database_t *notmuch; + notmuch_bool_t synchronize_flags; FILE *input; char *line = NULL; size_t line_size; @@ -41,8 +42,8 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[]) 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); + if (argc) { input = fopen (argv[0], "r"); if (input == NULL) { @@ -133,6 +134,9 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[]) notmuch_message_thaw (message); + if (synchronize_flags) + notmuch_message_tags_to_maildir_flags (message); + NEXT_LINE: if (message) notmuch_message_destroy (message);