From 1467c9b9d732d07d6a4015d204bca00645f0a79a Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Tue, 16 Jul 2013 12:44:30 -0400 Subject: [PATCH] Don't try to find OPKs inside non-existing directories --- src/menu.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/menu.cpp b/src/menu.cpp index d047465..bcc1e37 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -61,7 +61,12 @@ Menu::Menu(GMenu2X *gmenu2x, Touchscreen &ts) while ((dptr = readdir(dirp))) { if (dptr->d_type != DT_DIR) continue; - readPackages((string) CARD_ROOT + dptr->d_name + "/apps"); + + string path = (string) CARD_ROOT + dptr->d_name + "/apps"; + if (access(path.c_str(), F_OK)) + continue; + + readPackages(path); } closedir(dirp); }