small tweak on last change
authorGurusamy Sarathy <gsar@cpan.org>
Sun, 27 Sep 1998 03:38:55 +0000 (03:38 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 27 Sep 1998 03:38:55 +0000 (03:38 +0000)
p4raw-id: //depot/perl@1896

win32/win32.c

index aecab61..8497b67 100644 (file)
@@ -636,7 +636,7 @@ win32_opendir(char *filename)
        return NULL;
 
     /* check to see if filename is a directory */
-    if (win32_stat(filename, &sbuf) < 0)
+    if (win32_stat(filename, &sbuf) < 0 || !S_ISDIR(sbuf.st_mode))
        return NULL;
 
     /* Get us a DIR structure */