Pathname.exist? != File.exists?

This commit is contained in:
Thomas Reynolds 2012-06-01 19:05:32 -07:00
parent 00f232cf20
commit deb6bddaf6
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ require "pathname"
# Recursive method to find config.rb # Recursive method to find config.rb
def locate_root(cwd = Pathname.new(Dir.pwd)) def locate_root(cwd = Pathname.new(Dir.pwd))
return cwd.to_s if (cwd + 'config.rb').exists? return cwd.to_s if (cwd + 'config.rb').exist?
return false if cwd.root? return false if cwd.root?
locate_root(cwd.parent) locate_root(cwd.parent)
end end

View file

@ -107,7 +107,7 @@ module Middleman
# @param [Boolean] only_new Whether we only look for new files # @param [Boolean] only_new Whether we only look for new files
# @return [void] # @return [void]
def reload_path(path, only_new=false) def reload_path(path, only_new=false)
return unless path.exists? return unless path.exist?
glob = "#{path}**/*" glob = "#{path}**/*"
subset = @known_paths.select { |p| p.fnmatch(glob) } subset = @known_paths.select { |p| p.fnmatch(glob) }