mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 10:19:55 +02:00
bugfix for bad {SCENARIODIR} replacement
Done by softcoder in branch ce-gui, manually merged by me :) https://forum.megaglest.org/index.php?topic=9553.0
This commit is contained in:
@@ -285,13 +285,15 @@ bool Properties::isValuePathVariable(const string &value) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void Properties::updateValuePathVariable(string &value) {
|
||||
void Properties::updateValuePathVariable(string &value, bool skipUpdatePathClimbingParts) {
|
||||
replaceAll(value,"//","/");
|
||||
replaceAll(value,"\\\\","\\");
|
||||
updatePathClimbingParts(value);
|
||||
if(skipUpdatePathClimbingParts == false) {
|
||||
updatePathClimbingParts(value);
|
||||
}
|
||||
}
|
||||
|
||||
bool Properties::applyTagsToValue(string &value, const std::map<string,string> *mapTagReplacementValues) {
|
||||
bool Properties::applyTagsToValue(string &value, const std::map<string,string> *mapTagReplacementValues,bool skipUpdatePathClimbingParts) {
|
||||
string originalValue = value;
|
||||
bool valueRequiresPathUpdate = Properties::isValuePathVariable(value);
|
||||
//if(originalValue.find("$APPLICATIONDATAPATH") != string::npos) {
|
||||
@@ -389,7 +391,7 @@ bool Properties::applyTagsToValue(string &value, const std::map<string,string> *
|
||||
//}
|
||||
|
||||
if(valueRequiresPathUpdate == true) {
|
||||
Properties::updateValuePathVariable(value);
|
||||
Properties::updateValuePathVariable(value, skipUpdatePathClimbingParts);
|
||||
}
|
||||
return (originalValue != value);
|
||||
}
|
||||
|
Reference in New Issue
Block a user