diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-17 23:41:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-17 23:41:14 +0000 |
commit | d6379666cad4bda4e147b9f9bb2d07a80a1a3aa9 (patch) | |
tree | 0b0ce992288bef0ed0533a167686d8ae7518d217 /file.c | |
parent | d5cb997f18ad94969043d7847c7e22cef2483eca (diff) | |
download | ruby-d6379666cad4bda4e147b9f9bb2d07a80a1a3aa9.tar.gz |
file.c: set errno
* file.c (ruby_is_fd_loadable): set proper errno.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -5683,9 +5683,10 @@ ruby_is_fd_loadable(int fd) if (S_ISREG(st.st_mode)) return 1; - if (S_ISFIFO(st.st_mode)) + if (!S_ISDIR(st.st_mode)) return 1; + errno = EISDIR; return 0; #endif } |