diff options
author | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-08-16 22:29:10 +0000 |
---|---|---|
committer | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-08-16 22:29:10 +0000 |
commit | 0b1c91f30aeb340013db69c3ee1ab7beb68fd0bc (patch) | |
tree | 97758d891bd02bc1a68320fe947fe855f2f44607 /navit/bookmarks.c | |
parent | 0669396e1603b6dad7c363ca1eef20bb0962eb87 (diff) | |
download | navit-0b1c91f30aeb340013db69c3ee1ab7beb68fd0bc.tar.gz |
Fix:core:Close all handles to bookmark file, bevor attempting to overwrite. Fixes bookmark adding/changing/deleting on win32/wince
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3529 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/bookmarks.c')
-rw-r--r-- | navit/bookmarks.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/navit/bookmarks.c b/navit/bookmarks.c index cf8a113ef..be442d9c0 100644 --- a/navit/bookmarks.c +++ b/navit/bookmarks.c @@ -332,6 +332,12 @@ bookmarks_store_bookmarks_to_file(struct bookmarks *this_, int limit,int replac 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) { @@ -662,8 +668,8 @@ bookmarks_append_coord(struct bookmarks *this_, char *file, struct pcoord *c, co lines--; } - fclose(f); } + fclose(f); new_file: f=fopen(file, "a"); |