From deb6bddaf669dc6406e9d40ab974c049c0e7a14d Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Fri, 1 Jun 2012 19:05:32 -0700 Subject: [PATCH] Pathname.exist? != File.exists? --- middleman-core/bin/middleman | 2 +- .../lib/middleman-core/core_extensions/file_watcher.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/middleman-core/bin/middleman b/middleman-core/bin/middleman index cd2e7c1c..5d1d6af5 100755 --- a/middleman-core/bin/middleman +++ b/middleman-core/bin/middleman @@ -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 diff --git a/middleman-core/lib/middleman-core/core_extensions/file_watcher.rb b/middleman-core/lib/middleman-core/core_extensions/file_watcher.rb index c7cc26e5..58473f91 100644 --- a/middleman-core/lib/middleman-core/core_extensions/file_watcher.rb +++ b/middleman-core/lib/middleman-core/core_extensions/file_watcher.rb @@ -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) }