mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Fix multiple occurances of tags in launch commands not being replaced.
This commit is contained in:
parent
8739519e15
commit
c532c68dde
|
@ -61,14 +61,13 @@ SystemData::~SystemData()
|
||||||
delete mRootFolder;
|
delete mRootFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string strreplace(std::string& str, std::string replace, std::string with)
|
std::string strreplace(std::string str, const std::string& replace, const std::string& with)
|
||||||
{
|
{
|
||||||
size_t pos = str.find(replace);
|
size_t pos;
|
||||||
|
while((pos = str.find(replace)) != std::string::npos)
|
||||||
if(pos != std::string::npos)
|
str = str.replace(pos, replace.length(), with.c_str(), with.length());
|
||||||
return str.replace(pos, replace.length(), with.c_str(), with.length());
|
|
||||||
else
|
return str;
|
||||||
return str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string escapePath(const boost::filesystem::path& path)
|
std::string escapePath(const boost::filesystem::path& path)
|
||||||
|
|
Loading…
Reference in a new issue