]> 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 fc97f0b8cdf4d640d2b53a07728c3f19126320ef..7f33fd200e453b863b45b34842703d43a5c9ab52 100644 (file)
@@ -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;