From 32930cee013a37b99d1fa9f21bcb00fd578a612e Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Tue, 3 Jul 2012 10:55:42 -0600 Subject: [PATCH] extract_path fails on nil paths. --- lib/gollum/frontend/helpers.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/gollum/frontend/helpers.rb b/lib/gollum/frontend/helpers.rb index 1e78f617..845a0c7a 100644 --- a/lib/gollum/frontend/helpers.rb +++ b/lib/gollum/frontend/helpers.rb @@ -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]