summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMichael Hohmuth <sideral@rockbox.org>2011-04-15 21:45:45 +0000
committerMichael Hohmuth <sideral@rockbox.org>2011-04-15 21:45:45 +0000
commitcf223b98adadeb8b0c29ea604cd049f7798b5012 (patch)
treedfe106f0269e8815b6fd517c7001a54d9b0aa8d3 /apps
parentd49d2e1675f00731d03d5939b0880e62f8d9a440 (diff)
downloadrockbox-cf223b98adadeb8b0c29ea604cd049f7798b5012.tar.gz
rockbox-cf223b98adadeb8b0c29ea604cd049f7798b5012.zip
Do not attempt to remove the temporary database twice during a database update.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29716 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/tagcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 53d0a3bfcc..5abb32a109 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -3039,7 +3039,6 @@ static bool commit(void)
3039 } 3039 }
3040 3040
3041 close(tmpfd); 3041 close(tmpfd);
3042 remove(TAGCACHE_FILE_TEMP);
3043 3042
3044 tc_stat.commit_step = 0; 3043 tc_stat.commit_step = 0;
3045 3044
@@ -3050,6 +3049,8 @@ static bool commit(void)
3050 return false; 3049 return false;
3051 } 3050 }
3052 3051
3052 remove(TAGCACHE_FILE_TEMP);
3053
3053 tcmh.tch.entry_count += tch.entry_count; 3054 tcmh.tch.entry_count += tch.entry_count;
3054 tcmh.tch.datasize = sizeof(struct master_header) 3055 tcmh.tch.datasize = sizeof(struct master_header)
3055 + sizeof(struct index_entry) * tcmh.tch.entry_count 3056 + sizeof(struct index_entry) * tcmh.tch.entry_count
@@ -4479,7 +4480,6 @@ void tagcache_build(const char *path)
4479#endif 4480#endif
4480 if (commit()) 4481 if (commit())
4481 { 4482 {
4482 remove(TAGCACHE_FILE_TEMP);
4483 logf("tagcache built!"); 4483 logf("tagcache built!");
4484 } 4484 }
4485#ifdef __PCTOOL__ 4485#ifdef __PCTOOL__