diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2017-03-08 11:49:55 -0500 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2017-03-08 11:51:34 -0500 |
commit | e3081b35cdeb1e568c61369e5b3b15b6e428d3c3 (patch) | |
tree | a736fee7726ee7848a4d439b021b8ceec02c2223 /firmware/common/dircache.c | |
parent | 1ba5ef716d37a9fe7f0863caed2fab8570b2c7c4 (diff) |
Fix a couple dircache oopsies.
Moving binding from queued to resolved was messed up if it was the
first queued one and there were other resolved files open at the
time of resolving it.
Dircache info for a directory about to be recursively scanned should
be filled before opening it. Would only affect a directory if it
happened to be opening while it was being initialized.
Change-Id: I26ccf219c382d7caf1424b5ddddc4793e74cb390
Diffstat (limited to 'firmware/common/dircache.c')
-rw-r--r-- | firmware/common/dircache.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index 8a75f3bbad..08457f2da1 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c @@ -425,15 +425,18 @@ static void binding_resolve(const struct file_base_info *infop) } if (p == dcrivolp->queued0) + { dcrivolp->queued0 = BINDING_NEXT(p); + if (dcrivolp->resolved0 == NULL) + dcrivolp->resolved0 = p; + } else { file_binding_remove_next(prevp, p); file_binding_insert_first(p); + dcrivolp->resolved0 = p; } - dcrivolp->resolved0 = p; - /* srcinfop may be the actual one */ if (&p->info != infop) p->info.dcfile = infop->dcfile; @@ -1375,6 +1378,8 @@ static void sab_process_sub(struct sab *sabp) infop->fatfile.dircluster = dircluster; infop->fatfile.e.entry = ce->direntry; infop->fatfile.e.entries = ce->direntries; + infop->dcfile.idx = idx; + infop->dcfile.serialnum = ce->serialnum; } /* end while */ } |