Dont match on directories with the name of the intended file. Problem identified by JJ Gray

git-svn-id: file:///home/svn/framework3/trunk@10347 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2010-09-17 16:02:10 +00:00
parent 0a34941a79
commit d0ea92d35f
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ module FileUtils
path.split(::File::PATH_SEPARATOR).each { |base|
begin
path = base + ::File::SEPARATOR + file_name
if (::File::Stat.new(path))
if (::File::Stat.new(path) and not ::File.directory?(path))
return path
end
rescue