Merge pull request #366 from tomaz82/fix_escapedpath

Fix Utils::FileSystem::getEscapedPath
This commit is contained in:
Jools Wills 2018-02-02 18:37:31 +00:00 committed by GitHub
commit a0b624075b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;