Reset errno when starting to list directory content to make sure we don't inherit a previous failure.

git-svn-id: http://yate.null.ro/svn/yate/trunk@4247 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2011-03-31 12:10:16 +00:00
parent 28f530dfa4
commit 9db71618c3
1 changed files with 1 additions and 0 deletions

View File

@ -1135,6 +1135,7 @@ bool File::listDirectory(const char* path, ObjList* dirs, ObjList* files, int* e
*error = code;
::FindClose(hFind);
#else
errno = 0;
DIR* dir = ::opendir(path);
if (!dir) {
if (!errno)