mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55: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
|
* 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
|
* 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
|
* 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
|
* Lots and lots of small bugs and inconsistencies fixed
|
||||||
|
|
|
@ -51,7 +51,16 @@ FileData::FileData(
|
||||||
MameNames::getInstance()->getCleanName(getCleanName()));
|
MameNames::getInstance()->getCleanName(getCleanName()));
|
||||||
}
|
}
|
||||||
else {
|
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());
|
metadata.set("name", getDisplayName());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mSystemName = system->getName();
|
mSystemName = system->getName();
|
||||||
|
|
|
@ -132,8 +132,10 @@ void parseGamelist(SystemData* system)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip hidden files and folders.
|
// Skip hidden files, check both the file itself and the directory in which
|
||||||
if (!showHiddenFiles && Utils::FileSystem::isHidden(path)) {
|
// it is located.
|
||||||
|
if (!showHiddenFiles && (Utils::FileSystem::isHidden(path) ||
|
||||||
|
Utils::FileSystem::isHidden(Utils::FileSystem::getParent(path)))) {
|
||||||
LOG(LogDebug) << "Gamelist::parseGamelist(): Skipping hidden file " << path;
|
LOG(LogDebug) << "Gamelist::parseGamelist(): Skipping hidden file " << path;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue