mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-02 05:52:31 +01:00
Fix transforming gamename using multiple rules
The transformation was always applied to original name. This fixes it by applying additional rules to already transfromed name.
This commit is contained in:
parent
19815109c3
commit
a1a7fb4a28
@ -445,11 +445,11 @@ void Util::filepathReplaceReservedStrings(std::string& str, const std::string& g
|
||||
{
|
||||
boost::regex expression(transformMatch);
|
||||
boost::match_results<std::string::const_iterator> what;
|
||||
if (boost::regex_search(gamename, what, expression))
|
||||
if (boost::regex_search(gamename_transformed, what, expression))
|
||||
{
|
||||
boost::regex transformRegex(Globals::globalConfig.transformationsJSON[transformMatch]["regex"].asString());
|
||||
std::string transformReplacement = Globals::globalConfig.transformationsJSON[transformMatch]["replacement"].asString();
|
||||
gamename_transformed = boost::regex_replace(gamename, transformRegex, transformReplacement);
|
||||
gamename_transformed = boost::regex_replace(gamename_transformed, transformRegex, transformReplacement);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user