summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Grandin <grandinp@gmail.com>2018-04-10 21:43:24 -0700
committerjkoan <jkoan@gmx.de>2019-05-25 10:57:12 +0200
commit2940b05fe985ba5cc0da1ee2337d737689d1d99e (patch)
treecbcb7ce6c18ae649fd20ede392a17a4d5f75d16e
parentbbff86825991abb7408abf1691118b112c83bed2 (diff)
downloadnavit-2940b05fe985ba5cc0da1ee2337d737689d1d99e.tar.gz
Fix:bookmarks:Ensure that bookmarks are synced to disk
-rw-r--r--navit/bookmarks.c30
-rw-r--r--[-rwxr-xr-x]navit/support/espeak/espeak-data/voices/asia/hy0
-rw-r--r--[-rwxr-xr-x]navit/support/espeak/espeak-data/voices/europe/ca0
-rw-r--r--[-rwxr-xr-x]navit/support/espeak/espeak-data/voices/europe/sq0
-rw-r--r--[-rwxr-xr-x]navit/support/espeak/espeak-data/voices/europe/sr0
-rw-r--r--[-rwxr-xr-x]navit/support/espeak/espeak-data/voices/other/la0
6 files changed, 16 insertions, 14 deletions
diff --git a/navit/bookmarks.c b/navit/bookmarks.c
index a3e5c482d..818f25ce1 100644
--- a/navit/bookmarks.c
+++ b/navit/bookmarks.c
@@ -1,6 +1,6 @@
/**
* Navit, a modular navigation system.
- * Copyright (C) 2005-2010 Navit Team
+ * Copyright (C) 2005-2018 Navit Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -364,19 +364,21 @@ static int bookmarks_store_bookmarks_to_file(struct bookmarks *this_, int limit
fclose(f);
- g_hash_table_destroy(dedup);
-
- if (this_->mr) {
- map_rect_destroy(this_->mr);
- this_->mr = 0;
- }
-
- unlink(this_->bookmark_file);
- result=(rename(this_->working_file,this_->bookmark_file)==0);
- if (!result) {
- navit_add_message(this_->parent->u.navit,_("Failed to write bookmarks file"));
- }
- return result;
+ g_hash_table_destroy(dedup);
+
+ if (this_->mr) {
+ map_rect_destroy(this_->mr);
+ this_->mr = 0;
+ }
+
+ unlink(this_->bookmark_file);
+ sync();
+ result=(rename(this_->working_file,this_->bookmark_file)==0);
+ if (!result)
+ {
+ navit_add_message(this_->parent->u.navit,_("Failed to write bookmarks file"));
+ }
+ return result;
}
/**
diff --git a/navit/support/espeak/espeak-data/voices/asia/hy b/navit/support/espeak/espeak-data/voices/asia/hy
index 6c65e3c68..6c65e3c68 100755..100644
--- a/navit/support/espeak/espeak-data/voices/asia/hy
+++ b/navit/support/espeak/espeak-data/voices/asia/hy
diff --git a/navit/support/espeak/espeak-data/voices/europe/ca b/navit/support/espeak/espeak-data/voices/europe/ca
index dc51396ce..dc51396ce 100755..100644
--- a/navit/support/espeak/espeak-data/voices/europe/ca
+++ b/navit/support/espeak/espeak-data/voices/europe/ca
diff --git a/navit/support/espeak/espeak-data/voices/europe/sq b/navit/support/espeak/espeak-data/voices/europe/sq
index d0b729579..d0b729579 100755..100644
--- a/navit/support/espeak/espeak-data/voices/europe/sq
+++ b/navit/support/espeak/espeak-data/voices/europe/sq
diff --git a/navit/support/espeak/espeak-data/voices/europe/sr b/navit/support/espeak/espeak-data/voices/europe/sr
index a7a8223db..a7a8223db 100755..100644
--- a/navit/support/espeak/espeak-data/voices/europe/sr
+++ b/navit/support/espeak/espeak-data/voices/europe/sr
diff --git a/navit/support/espeak/espeak-data/voices/other/la b/navit/support/espeak/espeak-data/voices/other/la
index f3e97b523..f3e97b523 100755..100644
--- a/navit/support/espeak/espeak-data/voices/other/la
+++ b/navit/support/espeak/espeak-data/voices/other/la