Always use a fresh Page instance with #populate (for safety).
This commit is contained in:
+2
-2
@@ -257,7 +257,7 @@ module Gollum
|
|||||||
case item
|
case item
|
||||||
when Grit::Blob
|
when Grit::Blob
|
||||||
if page_match(name, item.name)
|
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
|
end
|
||||||
when Grit::Tree
|
when Grit::Tree
|
||||||
treemap[item] = ptree
|
treemap[item] = ptree
|
||||||
@@ -283,7 +283,7 @@ module Gollum
|
|||||||
when Grit::Blob
|
when Grit::Blob
|
||||||
if page_match(name, item.name)
|
if page_match(name, item.name)
|
||||||
path = dir == '' ? '' : ::File.join('/', dir)
|
path = dir == '' ? '' : ::File.join('/', dir)
|
||||||
return populate(item, path)
|
return self.class.new(@wiki).populate(item, path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user