Fix a relative path issue - apparently paths starting with '/' are still relative.

This commit is contained in:
Henrik Rydgard 2012-12-18 14:12:57 +01:00
parent 0448c62146
commit 90e87ead84
2 changed files with 8 additions and 2 deletions

View file

@ -122,7 +122,13 @@ bool RealPath(const std::string &currentDirectory, const std::string &inPath, st
if (inAfter.substr(0, 11) == "./PSP_GAME/")
inAfter = inAfter.substr(1);
if ((inAfter[0] != '/'))
// Apparently it's okay for relative paths to start with '/'.
// For example, kahoots does sceIoChdir(disc0:/PSP_GAME/USRDIR/)
// then opens paths like "/images/gui". Support this.
if (inColon == std::string::npos && inAfter[0] == '/')
inAfter = inAfter.substr(1);
if (inAfter[0] != '/')
{
if (curDirLen == 0)
{

View file

@ -2038,7 +2038,7 @@ void sceKernelCheckCallback()
bool callbacksProcessed = __KernelForceCallbacks();
if (callbacksProcessed) {
ERROR_LOG(HLE,"sceKernelCheckCallback() - processed a callback.");
DEBUG_LOG(HLE,"sceKernelCheckCallback() - processed a callback.");
} else {
RETURN(0);
}