diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index 5756b4917..c4df0ab33 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -62,7 +62,9 @@ def current_user # Extract the path string that Gollum::Wiki expects def extract_path(file_path) - pn = Pathname.new(file_path.dup).dirname.to_s.sub(/^\//,'') + path = file_path.dup + path << 'foo.tmp' if file_path =~ /\/$/ + pn = Pathname.new(path).dirname.to_s.sub(/^\//,'') pn unless ['','.','/'].include?(pn) end