From 77bb6088787a968ade0bc97eb1f17153796d5f88 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Fri, 27 Jul 2012 11:08:11 -0600 Subject: [PATCH] Fix #446. --- lib/gollum/committer.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/gollum/committer.rb b/lib/gollum/committer.rb index 16fef19b..fb4c202c 100644 --- a/lib/gollum/committer.rb +++ b/lib/gollum/committer.rb @@ -91,7 +91,11 @@ 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 / (@wiki.page_file_dir || '/') / dir + if index.current_tree && tree = index.current_tree / (@wiki.page_file_dir || '/') + tree = tree / dir unless tree.nil? + end + + if tree downpath = path.downcase.sub(/\.\w+$/, '') tree.blobs.each do |blob|