Any theme directories with names ending with disabled (regardless of case) are now ignored

This commit is contained in:
Leon Styhre 2023-03-21 17:22:17 +01:00
parent bfc59b9310
commit 6347ec9a3d

View file

@ -803,6 +803,13 @@ void ThemeData::populateThemeSets()
for (Utils::FileSystem::StringList::const_iterator it = dirContent.cbegin(); for (Utils::FileSystem::StringList::const_iterator it = dirContent.cbegin();
it != dirContent.cend(); ++it) { it != dirContent.cend(); ++it) {
if (Utils::FileSystem::isDirectory(*it)) { if (Utils::FileSystem::isDirectory(*it)) {
const std::string themeDirName {Utils::FileSystem::getFileName(*it)};
if (themeDirName == "themes-list" ||
(themeDirName.length() >= 8 &&
Utils::String::toLower(themeDirName.substr(themeDirName.length() - 8, 8)) ==
"disabled"))
continue;
#if defined(_WIN64) #if defined(_WIN64)
LOG(LogDebug) << "Loading theme set capabilities for \"" LOG(LogDebug) << "Loading theme set capabilities for \""
<< Utils::String::replace(*it, "/", "\\") << "\"..."; << Utils::String::replace(*it, "/", "\\") << "\"...";