Permalink
Browse files

Bugfix: Using the Pathname helper returned '' unless there was a file…

… to target.
  • Loading branch information...
1 parent 369d78e commit f778213aea996f424e7a225b63a45dfecb82e47b @dazoakley dazoakley committed May 29, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 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

0 comments on commit f778213

Please sign in to comment.