mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Fixed getCleanName(path).
This commit is contained in:
parent
91561480b3
commit
f32e8fff5a
|
@ -20,11 +20,12 @@ std::string getCleanFileName(const fs::path& path)
|
||||||
done = true;
|
done = true;
|
||||||
for(int i = 0; i < NUM_TO_REPLACE; i++)
|
for(int i = 0; i < NUM_TO_REPLACE; i++)
|
||||||
{
|
{
|
||||||
start = ret.find(toReplace[i*2]);
|
end = ret.find_first_of(toReplace[i*2+1]);
|
||||||
end = ret.find(toReplace[i*2+1], start != std::string::npos ? start + 1 : 0);
|
start = ret.find_last_of(toReplace[i*2], end);
|
||||||
|
|
||||||
if(start != std::string::npos && end != std::string::npos)
|
if(start != std::string::npos && end != std::string::npos)
|
||||||
{
|
{
|
||||||
ret.replace(start, end, "");
|
ret.erase(start, end - start + 1);
|
||||||
done = false;
|
done = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue