diff --git a/menu.cpp b/menu.cpp index b339bc1..3c12579 100644 --- a/menu.cpp +++ b/menu.cpp @@ -2383,7 +2383,11 @@ void HandleUI(void) case MENU_GENERIC_FILE_SELECTED: { - if (!mgl->done) snprintf(selPath, sizeof(selPath), "%s/%s", HomeDir(), mgl->item[mgl->current].path); + if (!mgl->done) + { + if(mgl->item[mgl->current].path[0] == '/') snprintf(selPath, sizeof(selPath), "%s", mgl->item[mgl->current].path); + else snprintf(selPath, sizeof(selPath), "%s/%s", HomeDir(), mgl->item[mgl->current].path); + } MenuHide(); printf("File selected: %s\n", selPath); @@ -2434,7 +2438,11 @@ void HandleUI(void) case MENU_GENERIC_IMAGE_SELECTED: { - if (!mgl->done) snprintf(selPath, sizeof(selPath), "%s/%s", HomeDir(((is_pce() && !strncasecmp(fs_pFileExt, "CUE", 3)) ? PCECD_DIR : NULL)), mgl->item[mgl->current].path); + if (!mgl->done) + { + if (mgl->item[mgl->current].path[0] == '/') snprintf(selPath, sizeof(selPath), "%s", mgl->item[mgl->current].path); + else snprintf(selPath, sizeof(selPath), "%s/%s", HomeDir(((is_pce() && !strncasecmp(fs_pFileExt, "CUE", 3)) ? PCECD_DIR : NULL)), mgl->item[mgl->current].path); + } if (store_name) {