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:
parent
28f530dfa4
commit
9db71618c3
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue