diff --git a/lib/gollum/file.rb b/lib/gollum/file.rb index 856eae4d..f9a5e754 100644 --- a/lib/gollum/file.rb +++ b/lib/gollum/file.rb @@ -17,12 +17,8 @@ module Gollum # # Returns the String url_path def url_path - path = if self.path.include?('/') - self.path.sub(/\/[^\/]+$/, '/') - else - '' - end - + path = self.path + path = path.sub(/\/[^\/]+$/, '/') if path.include?('/') path end