diff options
-rw-r--r-- | win32/win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index aecab617e4..8497b676b4 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -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 */ |