Merge pull request #494 from jrassa/variables-in-imports

allow variables in import elements
This commit is contained in:
Jools Wills 2018-10-26 03:57:31 +01:00 committed by GitHub
commit 5af905e2c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -248,7 +248,7 @@ void ThemeData::parseIncludes(const pugi::xml_node& root)
for(pugi::xml_node node = root.child("include"); node; node = node.next_sibling("include"))
{
const char* relPath = node.text().get();
std::string relPath = resolvePlaceholders(node.text().as_string());
std::string path = Utils::FileSystem::resolveRelativePath(relPath, mPaths.back(), true);
if(!ResourceManager::getInstance()->fileExists(path))
throw error << "Included file \"" << relPath << "\" not found! (resolved to \"" << path << "\")";