summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkoan <jkoan@gmx.de>2019-05-25 10:35:53 +0200
committerjkoan <jkoan@gmx.de>2019-05-25 10:57:25 +0200
commitb2a93644cb2337e74033bb24dde19b2dc543a047 (patch)
treedff78326c7c96074c9ce7b8c22a10f5e05e84baf
parent2940b05fe985ba5cc0da1ee2337d737689d1d99e (diff)
downloadnavit-b2a93644cb2337e74033bb24dde19b2dc543a047.tar.gz
fix:build:Add sync for windows as well
-rw-r--r--navit/bookmarks.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/navit/bookmarks.c b/navit/bookmarks.c
index 818f25ce1..9fb11efe9 100644
--- a/navit/bookmarks.c
+++ b/navit/bookmarks.c
@@ -359,8 +359,11 @@ static int bookmarks_store_bookmarks_to_file(struct bookmarks *this_, int limit
}
limit--;
- this_->bookmarks_list=g_list_next(this_->bookmarks_list);
- }
+ this_->bookmarks_list=g_list_next(this_->bookmarks_list);
+ }
+#ifdef FlushFileBuffers
+ FlushFileBuffers(f)
+#endif FlushFileBuffers
fclose(f);
@@ -372,7 +375,9 @@ static int bookmarks_store_bookmarks_to_file(struct bookmarks *this_, int limit
}
unlink(this_->bookmark_file);
+#ifdef _POSIX
sync();
+#endif _POSIX
result=(rename(this_->working_file,this_->bookmark_file)==0);
if (!result)
{