summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-20 10:08:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-20 10:08:41 +0000
commitdf453bab063fb65f7d2bf5088e6107272a1d3e9e (patch)
tree7ad7599f85b11fff6c0131b96b9dd408829b0597 /io.c
parent2b2256217eb359a055c394a0bebab94d2e7ac413 (diff)
fix previous commit.
don't use S_ISDIR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/io.c b/io.c
index 253690b42d..b0518c1b71 100644
--- a/io.c
+++ b/io.c
@@ -379,10 +379,9 @@ wsplit_p(OpenFile *fptr)
if (!(fptr->mode & FMODE_WSPLIT_INITIALIZED)) {
struct stat buf;
if (fstat(fptr->fd, &buf) == 0 &&
- !(S_ISREG(buf.st_mode) ||
- S_ISDIR(buf.st_mode))
+ !S_ISREG(buf.st_mode)
#if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
- && (r = fcntl(fileno(f), F_GETFL)) != -1 &&
+ && (r = fcntl(fptr->fd, F_GETFL)) != -1 &&
!(r & O_NONBLOCK)
#endif
) {