extract_path fails on nil paths.
This commit is contained in:
@@ -2,6 +2,7 @@ module Precious
|
||||
module Helpers
|
||||
# Extract the path string that Gollum::Wiki expects
|
||||
def extract_path(file_path)
|
||||
return nil if file_path.nil?
|
||||
last_slash = file_path.rindex("/")
|
||||
if last_slash
|
||||
file_path[0, last_slash]
|
||||
|
||||
Reference in New Issue
Block a user