Merge pull request #1353 from gollum/fix_1306

Do not attempt to normalize uploaded files unless they have valid page extensions.
This commit is contained in:
Bart Kamphorst
2018-11-29 12:04:07 +01:00
committed by GitHub
+3 -1
View File
@@ -227,9 +227,11 @@ module Precious
options.merge! author
end
normalize = Gollum::Page.valid_extension?(fullname)
begin
committer = Gollum::Committer.new(wiki, options)
committer.add_to_index(dir, filename, format, contents)
committer.add_to_index(dir, filename, format, contents, {normalize: normalize})
committer.after_commit do |committer, sha|
wiki.clear_cache
committer.update_working_dir(dir, filename, format)