summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-02-21 17:44:25 +0000
committerPierre Joye <pajoye@php.net>2010-02-21 17:44:25 +0000
commit481d1045cfb92c629e3bafb15c7a652bd4c6a5f8 (patch)
treeaba829c2ec10e95b2fa7203c680cada0df6f23a8
parent49be4b427f4143c68a2c595bd9c2006a5bf30e37 (diff)
downloadphp-git-481d1045cfb92c629e3bafb15c7a652bd4c6a5f8.tar.gz
- get the right error on windows
-rw-r--r--main/streams/plain_wrapper.c4
1 files changed, 4 insertions, 0 deletions
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;