From 77e4a8008b3c9e9bf796222f293445d1269ee743 Mon Sep 17 00:00:00 2001 From: The Dax Date: Thu, 30 May 2013 16:23:25 -0400 Subject: [PATCH] Fix accidental typo in MetaFileSystem.cpp. --- Core/FileSystems/MetaFileSystem.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Core/FileSystems/MetaFileSystem.cpp b/Core/FileSystems/MetaFileSystem.cpp index f14261e0b9..a19099b38c 100644 --- a/Core/FileSystems/MetaFileSystem.cpp +++ b/Core/FileSystems/MetaFileSystem.cpp @@ -188,16 +188,19 @@ bool MetaFileSystem::MapFilePath(const std::string &_inpath, std::string &outpat int currentThread = __KernelGetCurThread(); currentDir_t::iterator it = currentDir.find(currentThread); - //Attempt to emulate SCE_KERNEL_ERROR_NOCWD / 8002032C: may break things requiring fixes elsewhere - if (inpath.find(':') == std::string::npos /* means path is relative */) + if (it == currentDir.end()) { - errorCode = SCE_KERNEL_ERROR_NOCWD; - WARN_LOG_REPORT(HLE, "Path is relative, but current directory not set for thread %i. returning 8002032C(SCE_KERNEL_ERROR_NOCWD) instead.", currentThread, startingDirectory.c_str()); - return false; - } - else - { - currentDirectory = &(it->second); + //Attempt to emulate SCE_KERNEL_ERROR_NOCWD / 8002032C: may break things requiring fixes elsewhere + if (inpath.find(':') == std::string::npos /* means path is relative */) + { + errorCode = SCE_KERNEL_ERROR_NOCWD; + WARN_LOG_REPORT(HLE, "Path is relative, but current directory not set for thread %i. returning 8002032C(SCE_KERNEL_ERROR_NOCWD) instead.", currentThread, startingDirectory.c_str()); + return false; + } + else + { + currentDirectory = &(it->second); + } } if ( RealPath(*currentDirectory, inpath, realpath) )