Remove trailing '/' in getGenericPath

This commit is contained in:
Tomas Jakobsson 2018-08-20 15:32:31 +02:00
parent dc541e5e25
commit 15ccfc5a05

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;