mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
(Windows) Improved handling of hidden files and folders.
This commit is contained in:
parent
bad9e772e9
commit
b21dbc4ada
|
@ -51,16 +51,12 @@ FileData::FileData(
|
||||||
MameNames::getInstance()->getCleanName(getCleanName()));
|
MameNames::getInstance()->getCleanName(getCleanName()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef __unix__
|
|
||||||
if (metadata.getType() == FOLDER_METADATA && Utils::FileSystem::isHidden(mPath)) {
|
if (metadata.getType() == FOLDER_METADATA && Utils::FileSystem::isHidden(mPath)) {
|
||||||
metadata.set("name", Utils::FileSystem::getFileName(mPath));
|
metadata.set("name", Utils::FileSystem::getFileName(mPath));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
metadata.set("name", getDisplayName());
|
metadata.set("name", getDisplayName());
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
metadata.set("name", getDisplayName());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mSystemName = system->getName();
|
mSystemName = system->getName();
|
||||||
|
|
|
@ -307,6 +307,14 @@ bool SystemData::loadConfig()
|
||||||
// Convert path to generic directory seperators.
|
// Convert path to generic directory seperators.
|
||||||
path = Utils::FileSystem::getGenericPath(path);
|
path = Utils::FileSystem::getGenericPath(path);
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
|
if (!Settings::getInstance()->getBool("ShowHiddenFiles") &&
|
||||||
|
Utils::FileSystem::isHidden(path)) {
|
||||||
|
LOG(LogWarning) << "Skipping hidden ROM folder " << path;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Create the system runtime environment data.
|
// Create the system runtime environment data.
|
||||||
SystemEnvironmentData* envData = new SystemEnvironmentData;
|
SystemEnvironmentData* envData = new SystemEnvironmentData;
|
||||||
envData->mStartPath = path;
|
envData->mStartPath = path;
|
||||||
|
|
Loading…
Reference in a new issue