mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Merge pull request #622 from cmitu/fix-path
getGenericPath: don't remove trailing '/' when path is '/'.
This commit is contained in:
commit
7e687d7f4a
|
@ -237,8 +237,8 @@ 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)))
|
||||
// remove trailing '/' when the path is more than a simple '/'
|
||||
while(path.length() > 1 && ((offset = path.find_last_of('/')) == (path.length() - 1)))
|
||||
path.erase(offset, 1);
|
||||
|
||||
// return generic path
|
||||
|
|
Loading…
Reference in a new issue