dont crash when empty path configurations are specified

This commit is contained in:
zeromus 2010-06-21 06:17:40 +00:00
parent 5808c1d667
commit 271fd8bfe1
1 changed files with 10 additions and 4 deletions

View File

@ -269,11 +269,17 @@ public:
std::string temp = pathToCopy;
int len = (int)temp.size()-1;
#ifdef WIN32
if(temp[len] != '\\')
temp += "\\";
if(len == -1)
temp = ".\\";
else
if(temp[len] != '\\')
temp += "\\";
#else
if(temp[len] != '/')
temp += "/";
if(len == -1)
temp = "./";
else
if(temp[len] != '/')
temp += "/";
#endif
if(!Path::IsPathRooted(temp))