Pathname.exist? != File.exists?
This commit is contained in:
parent
00f232cf20
commit
deb6bddaf6
|
@ -12,7 +12,7 @@ require "pathname"
|
|||
|
||||
# Recursive method to find config.rb
|
||||
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?
|
||||
locate_root(cwd.parent)
|
||||
end
|
||||
|
|
|
@ -107,7 +107,7 @@ module Middleman
|
|||
# @param [Boolean] only_new Whether we only look for new files
|
||||
# @return [void]
|
||||
def reload_path(path, only_new=false)
|
||||
return unless path.exists?
|
||||
return unless path.exist?
|
||||
|
||||
glob = "#{path}**/*"
|
||||
subset = @known_paths.select { |p| p.fnmatch(glob) }
|
||||
|
|
Loading…
Reference in a new issue