Merge pull request #474 from tomaz82/getGenericPath_fix

Remove trailing '/' on paths in getGenericPath
This commit is contained in:
John Rassa 2018-08-29 22:11:32 -04:00 committed by GitHub
commit e2468fef18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -226,6 +226,10 @@ namespace Utils
while((offset = path.find("//")) != std::string::npos)
path.erase(offset, 1);
// remove trailing '/'
while(path.length() && ((offset = path.find_last_of('/')) == (path.length() - 1)))
path.erase(offset, 1);
// return generic path
return path;