summaryrefslogtreecommitdiff
path: root/firmware/common/dircache.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2011-07-01 13:38:20 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2011-07-01 13:38:20 +0000
commit563a185ff4521633e47d598210615c35acc44830 (patch)
tree693262bd37685f43fa6d4264f4e1f2180d0e86fa /firmware/common/dircache.c
parentf27028dbb69276c8fe810196418957b7860419cc (diff)
Fixed incorrect dircache reallocation during tagcache commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30108 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/dircache.c')
-rw-r--r--firmware/common/dircache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c
index 375ffa63ec..2ce178c7b9 100644
--- a/firmware/common/dircache.c
+++ b/firmware/common/dircache.c
@@ -828,11 +828,17 @@ int dircache_build(int last_size)
/* Background build, dircache has been previously allocated */
if (dircache_size > 0)
{
+ d_names_start = d_names_end;
+ dircache_size = 0;
+ reserve_used = 0;
thread_enabled = true;
dircache_initializing = true;
+ generate_dot_d_names();
+
queue_post(&dircache_queue, DIRCACHE_BUILD, 0);
return 2;
}
+
if (last_size > DIRCACHE_RESERVE && last_size < DIRCACHE_LIMIT )
{
allocated_size = last_size + DIRCACHE_RESERVE;