From acc6609a2723ccf767c1300b9a8b7eeb07133400 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 21 Feb 2010 17:44:25 +0000 Subject: [PATCH] - get the right error on windows --- main/streams/plain_wrapper.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.50.1