X-Git-Url: https://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/3c13bc0321baaf340663779d6fce2b1f34c1c2c3..0f35ddcdfc9d4011db32def6082f8aec5c372a7b:/notmuch-dump.c diff --git a/notmuch-dump.c b/notmuch-dump.c index 2849eaba..9c6ad7f4 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -169,7 +169,7 @@ notmuch_database_dump (notmuch_database_t *notmuch, } if (output_file_name) { - ret = fdatasync (outfd); + ret = fsync (outfd); if (ret) { fprintf (stderr, "Error syncing %s to disk: %s\n", name_for_error, strerror (errno)); @@ -212,7 +212,7 @@ notmuch_dump_command (notmuch_config_t *config, int argc, char *argv[]) int ret; if (notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_ONLY, ¬much)) + NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much)) return EXIT_FAILURE; char *output_file_name = NULL;