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
|
# 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
|
||||||
|
|
|
@ -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) }
|
||||||
|
|
Loading…
Reference in a new issue