From 5163918c113d5d0cbfabe69effbf3381af2ba4fe Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 25 May 2001 21:10:58 +0000 Subject: [PATCH] 010526 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dln.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dln.c b/dln.c index 40a326df63..d2c2c78c1b 100644 --- a/dln.c +++ b/dln.c @@ -1668,7 +1668,7 @@ dln_find_1(fname, path, exe_flag) if (stat(fbuf, &st) == 0) { if (exe_flag == 0) return fbuf; /* looking for executable */ - if (eaccess(fbuf, X_OK) == 0) return fbuf; + if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0) return fbuf; } #else if (mac_fullpath = _macruby_exist_file_in_libdir_as_posix_name(fbuf)) {