Always use a fresh Page instance with #populate (for safety).

This commit is contained in:
Tom Preston-Werner
2010-07-26 16:55:34 -07:00
parent aa7ae33107
commit 0ae8adc872
+2 -2
View File
@@ -257,7 +257,7 @@ module Gollum
case item
when Grit::Blob
if page_match(name, item.name)
return populate(item, tree_path(treemap, ptree))
return self.class.new(@wiki).populate(item, tree_path(treemap, ptree))
end
when Grit::Tree
treemap[item] = ptree
@@ -283,7 +283,7 @@ module Gollum
when Grit::Blob
if page_match(name, item.name)
path = dir == '' ? '' : ::File.join('/', dir)
return populate(item, path)
return self.class.new(@wiki).populate(item, path)
end
end
end