From 531c72cfb7175873aa4922173c0ad5505becfb97 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 21 Jan 2024 14:22:49 +0100 Subject: [PATCH] Fixed an issue where theme loading debug output would sometimes print incorrect paths when the configuration included files using variables --- es-core/src/ThemeData.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/es-core/src/ThemeData.cpp b/es-core/src/ThemeData.cpp index 3ce6b5be3..8c119484f 100644 --- a/es-core/src/ThemeData.cpp +++ b/es-core/src/ThemeData.cpp @@ -1506,15 +1506,15 @@ ThemeData::ThemeCapability ThemeData::parseThemeCapabilities(const std::string& void ThemeData::parseIncludes(const pugi::xml_node& root) { - ThemeException error; - error << "ThemeData::parseIncludes(): "; - error.setFiles(mPaths); - - // Check if there's an unsupported theme version tag. - if (root.child("formatVersion") != nullptr) - throw error << ": Unsupported tag found"; - for (pugi::xml_node node {root.child("include")}; node; node = node.next_sibling("include")) { + ThemeException error; + error << "ThemeData::parseIncludes(): "; + error.setFiles(mPaths); + + // Check if there's an unsupported theme version tag. + if (root.child("formatVersion") != nullptr) + throw error << ": Unsupported tag found"; + std::string relPath {resolvePlaceholders(node.text().as_string())}; std::string path {Utils::FileSystem::resolveRelativePath(relPath, mPaths.back(), true)};