mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
0bbb396c2c
commit
9a15c7c84a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue