forked from len0rd/rockbox
Simulator warns when archos dir is misssing. dirbrowse changed to
return false on error. Not used except for the simulator warning. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3197 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
23826f0a34
commit
816bc8c6b1
1 changed files with 8 additions and 2 deletions
10
apps/tree.c
10
apps/tree.c
|
|
@ -78,7 +78,13 @@ static bool reload_dir = false;
|
||||||
|
|
||||||
void browse_root(void)
|
void browse_root(void)
|
||||||
{
|
{
|
||||||
|
#ifndef SIMULATOR
|
||||||
dirbrowse("/");
|
dirbrowse("/");
|
||||||
|
#else
|
||||||
|
if (!dirbrowse("/")) {
|
||||||
|
DEBUGF("No filesystem found. Have you forgotten to create it?\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -995,7 +1001,7 @@ bool dirbrowse(char *root)
|
||||||
|
|
||||||
numentries = showdir(currdir, dirstart);
|
numentries = showdir(currdir, dirstart);
|
||||||
if (numentries == -1)
|
if (numentries == -1)
|
||||||
return -1; /* currdir is not a directory */
|
return false; /* currdir is not a directory */
|
||||||
update_all = true;
|
update_all = true;
|
||||||
|
|
||||||
put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
|
put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
|
||||||
|
|
@ -1417,7 +1423,7 @@ bool dirbrowse(char *root)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int plsize = 0;
|
static int plsize = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue