Fix spaces in dir #611
This commit is contained in:
@@ -85,6 +85,10 @@ module Gollum
|
||||
#
|
||||
# Returns nothing (modifies the Index in place).
|
||||
def add_to_index(dir, name, format, data, allow_same_ext = false)
|
||||
# spaces must be dashes
|
||||
dir.gsub!(' ', '-')
|
||||
name.gsub!(' ', '-')
|
||||
|
||||
path = @wiki.page_file_name(name, format)
|
||||
|
||||
dir = '/' if dir.strip.empty?
|
||||
|
||||
@@ -287,6 +287,10 @@ module Gollum
|
||||
# Returns the String SHA1 of the newly written version, or the
|
||||
# Gollum::Committer instance if this is part of a batch update.
|
||||
def write_page(name, format, data, commit = {}, dir = '')
|
||||
# spaces must be dashes
|
||||
name.gsub!(' ', '-')
|
||||
dir.gsub!(' ', '-')
|
||||
|
||||
multi_commit = false
|
||||
|
||||
committer = if obj = commit[:committer]
|
||||
|
||||
Reference in New Issue
Block a user