From 9ee9e613128e69cfd28543ec2ff9af63846fb3e7 Mon Sep 17 00:00:00 2001 From: "Jeong, Heon" Date: Sat, 19 May 2012 14:43:30 +0900 Subject: [PATCH] Fix searching in page_dir if it exists This bug can cause DuplicateError even there is no such file in page_dir --- lib/gollum/committer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gollum/committer.rb b/lib/gollum/committer.rb index e1911bdf..d7c43723 100644 --- a/lib/gollum/committer.rb +++ b/lib/gollum/committer.rb @@ -91,7 +91,7 @@ module Gollum fullpath = ::File.join(*[@wiki.page_file_dir, dir, path].compact) fullpath = fullpath[1..-1] if fullpath =~ /^\// - if index.current_tree && tree = index.current_tree / dir + if index.current_tree && tree = index.current_tree / (@wiki.page_file_dir || '/') / dir downpath = path.downcase.sub(/\.\w+$/, '') tree.blobs.each do |blob|