mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-29 19:47:30 +02:00
Ignore OPK files of which the name starts with a dot
These are not actual OPK files, but metadata (I assume) storage that Mac OS X adds to vfat file systems. The current version of libopk has extremely poor error handling, so ignoring these files avoids a crash. But even when libopk is fixed, not trying to open these files as OPKs will be useful since it saves time.
This commit is contained in:
parent
e4d78bee60
commit
90ec4b9ace
@ -464,6 +464,12 @@ void Menu::readPackages(std::string parentDir)
|
|||||||
if (strcasecmp(c + 1, "opk"))
|
if (strcasecmp(c + 1, "opk"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (dptr->d_name[0] == '.') {
|
||||||
|
// Ignore hidden files.
|
||||||
|
// Mac OS X places these on SD cards, probably to store metadata.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
path = parentDir + '/' + dptr->d_name;
|
path = parentDir + '/' + dptr->d_name;
|
||||||
|
|
||||||
pdata = opk_open(path.c_str());
|
pdata = opk_open(path.c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user