- see if this fixes loading issue on windows

This commit is contained in:
Mark Vejvoda
2013-01-31 23:59:05 +00:00
parent 5473372e4b
commit 864ef8acec
2 changed files with 29 additions and 0 deletions

View File

@@ -572,6 +572,20 @@ void updatePathClimbingParts(string &path) {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("CHANGED relative path from [%s] to [%s]\n",orig.c_str(),path.c_str());
}
// Update paths with /./
pos = path.find("/./");
if(pos != string::npos && pos != 0) {
string orig = path;
path.erase(pos,2);
pos--;
pos = path.find("/./");
if(pos != string::npos && pos != 0) {
updatePathClimbingParts(path);
}
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("CHANGED relative path from [%s] to [%s]\n",orig.c_str(),path.c_str());
}
/*
string::size_type pos = path.rfind("..");