diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-24 04:34:26 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-24 04:34:26 +0000 |
commit | 8b1de0b1ad49733abeddd8be359ae816b29de59a (patch) | |
tree | a7ed03dd3f6442635f694c4367bcd94be57f6dbd /file.c | |
parent | 24b9bdca25dc431aff935df7739b9c5ea0ee4077 (diff) |
2000-05-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -2033,6 +2033,7 @@ rb_find_file(file) volatile VALUE vpath; VALUE fname; char *path; + struct stat st; #if defined(__MACOS__) || defined(riscos) if (is_macos_native_path(file)) { @@ -2091,7 +2092,11 @@ rb_find_file(file) path = 0; } - return dln_find_file(file, path); + path = dln_find_file(file, path); + if (stat(path, &st) == 0) { + return path; + } + return 0; } void |