\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
- 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