]> granicus.if.org Git - php/commitdiff
- get the right error on windows
authorPierre Joye <pajoye@php.net>
Sun, 21 Feb 2010 17:44:25 +0000 (17:44 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 21 Feb 2010 17:44:25 +0000 (17:44 +0000)
main/streams/plain_wrapper.c

index f3722d9fc53e4a585c9801a45afa123209d302fe..23b9ccbb8624f52f638480cb5231d0f768d536f1 100644 (file)
@@ -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;