From: Pierre Joye Date: Sun, 21 Feb 2010 17:44:25 +0000 (+0000) Subject: - get the right error on windows X-Git-Tag: php-5.4.0alpha1~280 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=acc6609a2723ccf767c1300b9a8b7eeb07133400;p=php - get the right error on windows --- diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index f3722d9fc5..23b9ccbb86 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -866,6 +866,10 @@ static php_stream *php_plain_files_dir_opener(php_stream_wrapper *wrapper, char dir = VCWD_OPENDIR(path); #ifdef PHP_WIN32 + if (!dir) { + php_win32_docref2_from_error(GetLastError(), path, path TSRMLS_CC); + } + if (dir && dir->finished) { closedir(dir); dir = NULL;