mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed an issue on Unix where hidden games folders would crash the application.
This commit is contained in:
parent
e2bd5d05b1
commit
496e653ae7
2
NEWS.md
2
NEWS.md
|
@ -44,4 +44,6 @@ v1.0.0
|
|||
* Toggling the screensaver didn't work as expected
|
||||
* Deleting a game did not delete the game media files or its entry in the gamelist.xml file
|
||||
* SystemView didn't properly loop the systems if only two systems were available
|
||||
* Hidden files still showed up if they had a gamelist.xml entry
|
||||
* On Unix, adding a hidden folder with a game in it crashed the application on startup
|
||||
* Lots and lots of small bugs and inconsistencies fixed
|
||||
|
|
|
@ -50,9 +50,18 @@ FileData::FileData(
|
|||
metadata.set("name",
|
||||
MameNames::getInstance()->getCleanName(getCleanName()));
|
||||
}
|
||||
else {
|
||||
#ifdef __unix__
|
||||
if (metadata.getType() == FOLDER_METADATA && Utils::FileSystem::isHidden(mPath)) {
|
||||
metadata.set("name", Utils::FileSystem::getFileName(mPath));
|
||||
}
|
||||
else {
|
||||
metadata.set("name", getDisplayName());
|
||||
}
|
||||
#else
|
||||
metadata.set("name", getDisplayName());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
mSystemName = system->getName();
|
||||
metadata.resetChangedFlag();
|
||||
|
|
|
@ -132,8 +132,10 @@ void parseGamelist(SystemData* system)
|
|||
continue;
|
||||
}
|
||||
|
||||
// Skip hidden files and folders.
|
||||
if (!showHiddenFiles && Utils::FileSystem::isHidden(path)) {
|
||||
// Skip hidden files, check both the file itself and the directory in which
|
||||
// it is located.
|
||||
if (!showHiddenFiles && (Utils::FileSystem::isHidden(path) ||
|
||||
Utils::FileSystem::isHidden(Utils::FileSystem::getParent(path)))) {
|
||||
LOG(LogDebug) << "Gamelist::parseGamelist(): Skipping hidden file " << path;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue