From 4ff5e66cd4f6dfa89f81219b194512eefead18bd Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 24 May 2000 04:34:26 +0000 Subject: 2000-05-24 git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'file.c') diff --git a/file.c b/file.c index 90e3e4d64..3e0a19d37 100644 --- a/file.c +++ b/file.c @@ -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 -- cgit