diff --git a/lib/gollum/committer.rb b/lib/gollum/committer.rb index 3a1e13da..719c1a95 100644 --- a/lib/gollum/committer.rb +++ b/lib/gollum/committer.rb @@ -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? diff --git a/lib/gollum/wiki.rb b/lib/gollum/wiki.rb index 51d505f6..fe1c847c 100644 --- a/lib/gollum/wiki.rb +++ b/lib/gollum/wiki.rb @@ -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]