notaz.gp2x.de
/
libpicofe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
misc gp2x tweaks
[libpicofe.git]
/
common
/
menu.c
diff --git
a/common/menu.c
b/common/menu.c
index
8e3b9dd
..
b5e5e36
100644
(file)
--- a/
common/menu.c
+++ b/
common/menu.c
@@
-797,10
+797,13
@@
rescan:
\r
n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp);
\r
if (n < 0) {
\r
\r
n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp);
\r
if (n < 0) {
\r
+ char *t;
\r
lprintf("menu_loop_romsel failed, dir: %s\n", curr_path);
\r
\r
// try root
\r
lprintf("menu_loop_romsel failed, dir: %s\n", curr_path);
\r
\r
// try root
\r
- plat_get_root_dir(curr_path, len);
\r
+ t = getcwd(curr_path, len);
\r
+ if (t == NULL)
\r
+ plat_get_root_dir(curr_path, len);
\r
n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp);
\r
if (n < 0) {
\r
// oops, we failed
\r
n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp);
\r
if (n < 0) {
\r
// oops, we failed
\r