Better hack for a path problem. Still don't get it.

This commit is contained in:
Henrik Rydgard 2012-12-18 00:01:40 +01:00
parent 3bd5cfed73
commit 2937928237
2 changed files with 7 additions and 2 deletions

View file

@ -138,7 +138,7 @@ u32 DirectoryFileSystem::OpenFile(std::string filename, FileAccess access)
if (!success)
{
#ifdef _WIN32
ERROR_LOG(HLE, "DirectoryFileSystem::OpenFile: FAILED, %i", GetLastError());
ERROR_LOG(HLE, "DirectoryFileSystem::OpenFile: FAILED, %i - access = %i", GetLastError(), (int)access);
#endif
//wwwwaaaaahh!!
return 0;

View file

@ -20,7 +20,6 @@
bool applyPathStringToComponentsVector(std::vector<std::string> &vector, const std::string &pathString)
{
vector.clear();
size_t len = pathString.length();
size_t start = 0;
@ -117,6 +116,12 @@ bool RealPath(const std::string &currentDirectory, const std::string &inPath, st
std::vector<std::string> cmpnts; // path components
size_t capacityGuess = inPath.length();
// Special hack for strange root paths.
// Don't understand why this is needed. I don't think the current
// directory should be the root.
if (inAfter.substr(0, 11) == "./PSP_GAME/")
inAfter = inAfter.substr(1);
if ((inAfter[0] != '/'))
{
if (curDirLen == 0)