diff options
author | Andi Gutmans <andi@php.net> | 2001-04-29 17:57:23 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2001-04-29 17:57:23 +0000 |
commit | 21603118b1616c0c3e80535a4bfee5ff0a8376df (patch) | |
tree | e915826e135d3008b3db6235c8954c81c872e3d0 /ext/standard/dir.c | |
parent | 6487d08e6bbb1d3955e63934b4994a2ac87f8fd5 (diff) | |
download | php-git-21603118b1616c0c3e80535a4bfee5ff0a8376df.tar.gz |
- Fix bug Bug id #5987. It could be fixed by changing readdir.c but I
- prefered not to touch that code but to treat windows a bit differently
- in dir.c
PR:
Submitted by:
Reviewed by:
Obtained from:
Diffstat (limited to 'ext/standard/dir.c')
-rw-r--r-- | ext/standard/dir.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 97e2b547e7..e00569fe28 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -167,8 +167,12 @@ static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject) dirp = emalloc(sizeof(php_dir)); dirp->dir = V_OPENDIR((*arg)->value.str.val); - - if (! dirp->dir) { + +#ifdef PHP_WIN32 + if (!dirp->dir || dirp->dir->finished) { +#else + if (!dirp->dir) { +#endif efree(dirp); php_error(E_WARNING, "OpenDir: %s (errno %d)", strerror(errno), errno); RETURN_FALSE; |