From 7c4e0c8730d5b076d4db4206361bc38d5256a23f Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Sun, 26 Mar 2006 11:33:42 +0000 Subject: Initial version of tagcache! There are still some bugs in the engine and much more problems with the UI. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9256 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/dircache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'firmware/common') diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index 4facbb8ab2..f9fd63b8e4 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c @@ -84,8 +84,8 @@ static struct dircache_entry* allocate_entry(void) /* Make sure the entry is long aligned. */ if ((long)next_entry & 0x03) { - next_entry = (struct dircache_entry *)(((long)next_entry & ~0x03) + 0x04); dircache_size += 4 - ((long)next_entry & 0x03); + next_entry = (struct dircache_entry *)(((long)next_entry & ~0x03) + 0x04); } #endif next_entry->name_len = 0; @@ -95,7 +95,6 @@ static struct dircache_entry* allocate_entry(void) next_entry->next = NULL; dircache_size += sizeof(struct dircache_entry); - entry_count++; return next_entry; } @@ -186,6 +185,7 @@ static int dircache_scan(struct travel_data *td) td->ce->wrttime = td->entry.wrttime; memcpy(td->ce->d_name, td->entry.name, td->ce->name_len); dircache_size += td->ce->name_len; + entry_count++; if (td->entry.attr & FAT_ATTR_DIRECTORY) { -- cgit v1.2.3