From eb54ede182dd882f4b0ab592d0a69fbc2bfbec70 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Wed, 17 Feb 2010 19:31:07 +0000 Subject: Fix error handling in dircache generation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24730 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/dircache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'firmware/common/dircache.c') diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index 078836147e..618240f542 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c @@ -259,10 +259,10 @@ static int sab_process_dir(unsigned long startcluster, struct dircache_entry *ce /* second pass: recurse ! */ ce = first_ce; - while(ce) + while(rc >= 0 && ce) { if(ce->name_len != 0 && ce->down != NULL && strcmp(ce->d_name, ".") && strcmp(ce->d_name, "..")) - sab_process_dir(ce->startcluster, ce->down); + rc = sab_process_dir(ce->startcluster, ce->down); ce = ce->next; } -- cgit