diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-24 10:57:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-24 10:57:35 +0000 |
commit | 9a15c7c84a7871bf05e4d136df72ab5cc03cd6ca (patch) | |
tree | a65594a20172c4af65e5e2c759594623b9563f48 /dln_find.c | |
parent | 0bbb396c2ce2919e3d86a587908826a35300066a (diff) | |
download | ruby-9a15c7c84a7871bf05e4d136df72ab5cc03cd6ca.tar.gz |
dln_find.c: regular files only
* dln_find.c (dln_find_1): search regular files only. based on
the patch by Alex Coomans in [ruby-core:67766]. [Bug #10776]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln_find.c')
-rw-r--r-- | dln_find.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dln_find.c b/dln_find.c index 74bedddfec..4e88d4f9cb 100644 --- a/dln_find.c +++ b/dln_find.c @@ -278,7 +278,7 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size, } #endif /* _WIN32 or __EMX__ */ - if (stat(fbuf, &st) == 0 && !S_ISDIR(st.st_mode)) { + if (stat(fbuf, &st) == 0 && S_ISREG(st.st_mode)) { if (exe_flag == 0) return fbuf; /* looking for executable */ if (eaccess(fbuf, X_OK) == 0) return fbuf; |