From 90e87ead848281c99f5703f450d3d1bb93b1fc71 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Tue, 18 Dec 2012 14:12:57 +0100 Subject: [PATCH] Fix a relative path issue - apparently paths starting with '/' are still relative. --- Core/FileSystems/MetaFileSystem.cpp | 8 +++++++- Core/HLE/sceKernelThread.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Core/FileSystems/MetaFileSystem.cpp b/Core/FileSystems/MetaFileSystem.cpp index 9d69f1d138..772b056bbf 100644 --- a/Core/FileSystems/MetaFileSystem.cpp +++ b/Core/FileSystems/MetaFileSystem.cpp @@ -122,7 +122,13 @@ bool RealPath(const std::string ¤tDirectory, 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) { diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index a35a984362..99fae0257e 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -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); }