* file.c (file_load_ok): cygwin allows to open directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
be7679308b
commit
8d325b6bbc
2
file.c
2
file.c
@ -4524,7 +4524,7 @@ file_load_ok(const char *path)
|
|||||||
int ret = 1;
|
int ret = 1;
|
||||||
int fd = open(path, O_RDONLY);
|
int fd = open(path, O_RDONLY);
|
||||||
if (fd == -1) return 0;
|
if (fd == -1) return 0;
|
||||||
#if !(defined DOSISH || defined __CYGWIN__)
|
#if !defined DOSISH
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (fstat(fd, &st) || !S_ISREG(st.st_mode)) {
|
if (fstat(fd, &st) || !S_ISREG(st.st_mode)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user