From be98103e05ea9171cb4629ac4150a707fb002cd0 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Sun, 9 Nov 2014 11:30:11 -0800 Subject: [PATCH] An attempt to fix #1402 --- middleman-core/lib/middleman-core/load_paths.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/middleman-core/lib/middleman-core/load_paths.rb b/middleman-core/lib/middleman-core/load_paths.rb index 5a3e3fbe..7daffe4c 100644 --- a/middleman-core/lib/middleman-core/load_paths.rb +++ b/middleman-core/lib/middleman-core/load_paths.rb @@ -37,7 +37,8 @@ module Middleman end # Recursive method to find a file in parent directories - def findup(filename, cwd=Pathname.new(Dir.pwd)) + def findup(filename, cwd=Dir.pwd) + cwd = Pathname(cwd) return cwd.to_s if (cwd + filename).exist? return false if cwd.root? findup(filename, cwd.parent)