diff options
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/tree.c b/apps/tree.c index 41aafd30b5..7151dca6c0 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -78,7 +78,13 @@ static bool reload_dir = false; | |||
78 | 78 | ||
79 | void browse_root(void) | 79 | void browse_root(void) |
80 | { | 80 | { |
81 | #ifndef SIMULATOR | ||
81 | dirbrowse("/"); | 82 | dirbrowse("/"); |
83 | #else | ||
84 | if (!dirbrowse("/")) { | ||
85 | DEBUGF("No filesystem found. Have you forgotten to create it?\n"); | ||
86 | } | ||
87 | #endif | ||
82 | } | 88 | } |
83 | 89 | ||
84 | 90 | ||
@@ -995,7 +1001,7 @@ bool dirbrowse(char *root) | |||
995 | 1001 | ||
996 | numentries = showdir(currdir, dirstart); | 1002 | numentries = showdir(currdir, dirstart); |
997 | if (numentries == -1) | 1003 | if (numentries == -1) |
998 | return -1; /* currdir is not a directory */ | 1004 | return false; /* currdir is not a directory */ |
999 | update_all = true; | 1005 | update_all = true; |
1000 | 1006 | ||
1001 | put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true); | 1007 | put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true); |
@@ -1417,7 +1423,7 @@ bool dirbrowse(char *root) | |||
1417 | } | 1423 | } |
1418 | } | 1424 | } |
1419 | 1425 | ||
1420 | return false; | 1426 | return true; |
1421 | } | 1427 | } |
1422 | 1428 | ||
1423 | static int plsize = 0; | 1429 | static int plsize = 0; |