Fix path access, found by Nalin.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2581 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2009-08-10 07:26:05 +00:00
parent 48f48aeacb
commit 78457b9333
1 changed files with 3 additions and 2 deletions

View File

@ -107,10 +107,11 @@ void CFileList::constructNative()
}
if (!tmpPath)
return;
// note that Path might be stringw, so use tmpPath for system call
Path = tmpPath;
delete [] tmpPath;
// We use the POSIX compliant methods instead of scandir
DIR* dirHandle=opendir(Path.c_str());
DIR* dirHandle=opendir(tmpPath);
delete [] tmpPath;
if (!dirHandle)
return;