mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
map chdir paths
This commit is contained in:
1 parent
320c0d06c3
commit
5ce75551d7
1 file changed
+15
-3
@@ -301,10 +301,22 @@ void MetaFileSystem::ThreadEnded(int threadID)
|
||||
|
||||
void MetaFileSystem::ChDir(const std::string &dir)
|
||||
{
|
||||
//TODO: test sceIoChdir("..") on PSP - maybe we should map it before saving it?
|
||||
|
||||
int curThread = __KernelGetCurThread();
|
||||
currentDir[curThread] = dir;
|
||||
|
||||
std::string of;
|
||||
IFileSystem *system;
|
||||
if (MapFilePath(dir, of, &system))
|
||||
{
|
||||
currentDir[curThread] = of;
|
||||
//return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO: PSP's sceIoChdir seems very forgiving, but does it always accept bad paths and what happens when it does?
|
||||
WARN_LOG(HLE, "ChDir failed to map path \"%s\", saving as current directory anyway", dir.c_str());
|
||||
currentDir[curThread] = dir;
|
||||
//return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool MetaFileSystem::MkDir(const std::string &dirname)
|
||||
|
||||
Reference in new issue
Block a user