Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Bugfix: Using the Pathname helper returned '' unless there was a file…
Browse files Browse the repository at this point in the history
… to target.
  • Loading branch information
dazoakley committed May 29, 2012
1 parent 369d78e commit f778213
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/gollum/frontend/app.rb
Expand Up @@ -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

Expand Down

0 comments on commit f778213

Please sign in to comment.