tests show PSP doesn't tolerate extra /s at the end in an ISO
This commit is contained in:
parent
4f0ec690a7
commit
c7d24407ee
1 changed files with 2 additions and 2 deletions
|
@ -336,7 +336,7 @@ ISOFileSystem::TreeEntry *ISOFileSystem::GetFromPath(const std::string &path, bo
|
||||||
size_t nextSlashIndex = path.find_first_of('/', pathIndex);
|
size_t nextSlashIndex = path.find_first_of('/', pathIndex);
|
||||||
if (nextSlashIndex == std::string::npos)
|
if (nextSlashIndex == std::string::npos)
|
||||||
nextSlashIndex = pathLength;
|
nextSlashIndex = pathLength;
|
||||||
|
|
||||||
const std::string firstPathComponent = path.substr(pathIndex, nextSlashIndex - pathIndex);
|
const std::string firstPathComponent = path.substr(pathIndex, nextSlashIndex - pathIndex);
|
||||||
auto child = e->fastChildren.find(firstPathComponent);
|
auto child = e->fastChildren.find(firstPathComponent);
|
||||||
if (child != e->fastChildren.end()) {
|
if (child != e->fastChildren.end()) {
|
||||||
|
@ -350,7 +350,7 @@ ISOFileSystem::TreeEntry *ISOFileSystem::GetFromPath(const std::string &path, bo
|
||||||
{
|
{
|
||||||
e = ne;
|
e = ne;
|
||||||
pathIndex += name.length();
|
pathIndex += name.length();
|
||||||
while (pathIndex < pathLength && path[pathIndex] == '/')
|
if (pathIndex < pathLength && path[pathIndex] == '/')
|
||||||
++pathIndex;
|
++pathIndex;
|
||||||
|
|
||||||
if (pathLength <= pathIndex)
|
if (pathLength <= pathIndex)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue