Don't skip before data has been read in.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10201 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2006-07-12 08:58:18 +00:00
parent 4e19e6d20a
commit 3bddace4f8

View file

@ -2329,10 +2329,6 @@ static bool load_tagcache(void)
// idx = &hdr->indices[hdr->entry_count[i]]; // idx = &hdr->indices[hdr->entry_count[i]];
idx = &hdr->indices[fe->idx_id]; idx = &hdr->indices[fe->idx_id];
/* Check if the entry has already been removed */
if (idx->flag & FLAG_DELETED)
continue;
if (fe->tag_length >= (long)sizeof(buf)-1) if (fe->tag_length >= (long)sizeof(buf)-1)
{ {
read(fd, buf, 10); read(fd, buf, 10);
@ -2351,6 +2347,10 @@ static bool load_tagcache(void)
return false; return false;
} }
/* Check if the entry has already been removed */
if (idx->flag & FLAG_DELETED)
continue;
# ifdef HAVE_DIRCACHE # ifdef HAVE_DIRCACHE
if (dircache_is_enabled()) if (dircache_is_enabled())
{ {