From: notaz Date: Tue, 8 Dec 2009 19:50:24 +0000 (+0000) Subject: misc gp2x tweaks X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a96477bb5e1623dc132d632ac51a22cf7bdabfa7;p=libpicofe.git misc gp2x tweaks git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@839 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/common/menu.c b/common/menu.c index 8e3b9dd..b5e5e36 100644 --- a/common/menu.c +++ b/common/menu.c @@ -797,10 +797,13 @@ rescan: n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp); if (n < 0) { + char *t; lprintf("menu_loop_romsel failed, dir: %s\n", curr_path); // try root - plat_get_root_dir(curr_path, len); + t = getcwd(curr_path, len); + if (t == NULL) + plat_get_root_dir(curr_path, len); n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp); if (n < 0) { // oops, we failed