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
This commit is contained in:
parent
d49d2e1675
commit
cf223b98ad
1 changed files with 2 additions and 2 deletions
|
@ -3039,7 +3039,6 @@ static bool commit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
close(tmpfd);
|
close(tmpfd);
|
||||||
remove(TAGCACHE_FILE_TEMP);
|
|
||||||
|
|
||||||
tc_stat.commit_step = 0;
|
tc_stat.commit_step = 0;
|
||||||
|
|
||||||
|
@ -3050,6 +3049,8 @@ static bool commit(void)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remove(TAGCACHE_FILE_TEMP);
|
||||||
|
|
||||||
tcmh.tch.entry_count += tch.entry_count;
|
tcmh.tch.entry_count += tch.entry_count;
|
||||||
tcmh.tch.datasize = sizeof(struct master_header)
|
tcmh.tch.datasize = sizeof(struct master_header)
|
||||||
+ sizeof(struct index_entry) * tcmh.tch.entry_count
|
+ sizeof(struct index_entry) * tcmh.tch.entry_count
|
||||||
|
@ -4479,7 +4480,6 @@ void tagcache_build(const char *path)
|
||||||
#endif
|
#endif
|
||||||
if (commit())
|
if (commit())
|
||||||
{
|
{
|
||||||
remove(TAGCACHE_FILE_TEMP);
|
|
||||||
logf("tagcache built!");
|
logf("tagcache built!");
|
||||||
}
|
}
|
||||||
#ifdef __PCTOOL__
|
#ifdef __PCTOOL__
|
||||||
|
|
Loading…
Reference in a new issue