summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/tree.c10
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;
void browse_root(void)
{
+#ifndef SIMULATOR
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);
if (numentries == -1)
- return -1; /* currdir is not a directory */
+ return false; /* currdir is not a directory */
update_all = 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;