notmuch-dump: use fsync instead of fdatasync

Since the file size will have changed, there is no performance benefit
to calling fdatasync.  Somewhat surprisingly, using fdatasync
apparently causes portability problems on FreeBSD.
This commit is contained in:
David Bremner 2014-05-08 20:57:07 +09:00
parent f6b54fbcf6
commit f3ee655b49

View file

@ -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));