Fix start and offset not being reset for each invalidChar tested in Utils::FileSystem::GetEscapedPath

This commit is contained in:
Tomas Jakobsson 2018-02-02 16:45:21 +01:00
parent bb678eecd1
commit 6054cb673d

View file

@ -206,11 +206,12 @@ namespace Utils
// insert a backslash before most characters that would mess up a bash path
const char* invalidChars = "\\ '\"!$^&*(){}[]?;<>";
const char* invalidChar = invalidChars;
size_t start = 0;
size_t offset = 0;
while(*invalidChar)
{
size_t start = 0;
size_t offset = 0;
while((offset = path.find(*invalidChar, start)) != std::string::npos)
{
start = offset + 1;