]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-restore.c
test: copy files in test_expect_equal_file instead of moving them
[notmuch] / notmuch-restore.c
index b0a4e1ce7905fc52157ce35c471fe1b31446f549..f095f64a76b7054dbda62b1fd8f9f4efa975117b 100644 (file)
@@ -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,6 +42,8 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
     if (notmuch == NULL)
        return 1;
 
+    synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config);
+
     if (argc) {
        input = fopen (argv[0], "r");
        if (input == NULL) {
@@ -131,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);