Commit 78457b93 authored by hybrid's avatar hybrid

Fix path access, found by Nalin.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2581 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 48f48aea
...@@ -107,10 +107,11 @@ void CFileList::constructNative() ...@@ -107,10 +107,11 @@ void CFileList::constructNative()
} }
if (!tmpPath) if (!tmpPath)
return; return;
// note that Path might be stringw, so use tmpPath for system call
Path = tmpPath; Path = tmpPath;
delete [] tmpPath;
// We use the POSIX compliant methods instead of scandir // We use the POSIX compliant methods instead of scandir
DIR* dirHandle=opendir(Path.c_str()); DIR* dirHandle=opendir(tmpPath);
delete [] tmpPath;
if (!dirHandle) if (!dirHandle)
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment