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
+6 -1
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)