core: fix theme cycling

This commit is contained in:
Vaxry 2024-03-09 17:45:39 +00:00
parent 68fb602188
commit a5cfddb46f

View file

@ -89,6 +89,9 @@ static std::string getFullPathForThemeName(const std::string& name) {
if (!themeDir.is_directory())
continue;
if (!name.empty() && themeDir.path().stem().string() != name)
continue;
const auto MANIFESTPATH = themeDir.path().string() + "/manifest.hl";
if (std::filesystem::exists(MANIFESTPATH))
@ -106,6 +109,9 @@ static std::string getFullPathForThemeName(const std::string& name) {
if (!themeDir.is_directory())
continue;
if (!name.empty() && themeDir.path().stem().string() != name)
continue;
const auto MANIFESTPATH = themeDir.path().string() + "/manifest.hl";
if (std::filesystem::exists(MANIFESTPATH))
@ -113,6 +119,9 @@ static std::string getFullPathForThemeName(const std::string& name) {
}
}
if (!name.empty()) // try without name
return getFullPathForThemeName("");
return "";
}