FileLister: handle '\\' path separator the same way '/' is handled

This commit is contained in:
Daniel Marjamäki 2009-02-15 11:26:00 +00:00
parent 6b52ee03cf
commit cc63506b03
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ std::string FileLister::simplifyPath(const char *originalPath)
std::vector<std::string> pathParts; std::vector<std::string> pathParts;
for (; *originalPath; ++originalPath) for (; *originalPath; ++originalPath)
{ {
if (*originalPath == '/') if (*originalPath == '/' || *originalPath == '\\')
{ {
if (subPath.length() > 0) if (subPath.length() > 0)
{ {
@ -49,7 +49,7 @@ std::string FileLister::simplifyPath(const char *originalPath)
subPath = ""; subPath = "";
} }
pathParts.push_back("/"); pathParts.push_back(std::string(1 , *originalPath));
} }
else else
subPath.append(1, *originalPath); subPath.append(1, *originalPath);