From ba7a5ebfb9f61b796397aa7b738a899578eee2ea Mon Sep 17 00:00:00 2001 From: emb <> Date: Wed, 28 Oct 2015 22:52:44 -0500 Subject: [PATCH] Reverted ITEM_COLLECTION_NAME, yet again, caused bugs when preloading. --- RetroFE/Source/Database/Configuration.cpp | 5 ++++- RetroFE/Source/Main.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RetroFE/Source/Database/Configuration.cpp b/RetroFE/Source/Database/Configuration.cpp index 8f8a621..7d3e294 100644 --- a/RetroFE/Source/Database/Configuration.cpp +++ b/RetroFE/Source/Database/Configuration.cpp @@ -133,8 +133,11 @@ bool Configuration::parseLine(std::string collection, std::string keyPrefix, std value = line.substr(position + delimiter.length(), line.length()); value = trimEnds(value); - value = Utils::replace(value, "%ITEM_COLLECTION_NAME%", collection); + if(collection != "") + { + value = Utils::replace(value, "%ITEM_COLLECTION_NAME%", collection); + } properties_.insert(PropertiesPair(key, value)); std::stringstream ss; diff --git a/RetroFE/Source/Main.cpp b/RetroFE/Source/Main.cpp index 519617e..d14bb6a 100644 --- a/RetroFE/Source/Main.cpp +++ b/RetroFE/Source/Main.cpp @@ -115,7 +115,7 @@ bool ImportConfiguration(Configuration *c) std::string importFile = Utils::combinePath(launchersPath, std::string(dirp->d_name)); - if(!c->import(basename, prefix, importFile)) + if(!c->import(prefix, importFile)) { Logger::write(Logger::ZONE_ERROR, "RetroFE", "Could not import \"" + importFile + "\""); closedir(dp);