From 481d1045cfb92c629e3bafb15c7a652bd4c6a5f8 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 fc97f0b8cd..7f33fd200e 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -863,6 +863,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