Merge pull request #487 from jm/master
Fix bug with missing variable 'ext'
This commit is contained in:
@@ -100,9 +100,13 @@ module Gollum
|
|||||||
|
|
||||||
tree.blobs.each do |blob|
|
tree.blobs.each do |blob|
|
||||||
next if page_path_scheduled_for_deletion?(index.tree, fullpath)
|
next if page_path_scheduled_for_deletion?(index.tree, fullpath)
|
||||||
file = blob.name.downcase.sub(/\.\w+$/, '')
|
|
||||||
file_ext = ::File.extname(blob.name).sub(/^\./, '')
|
existing_file = blob.name.downcase.sub(/\.\w+$/, '')
|
||||||
if downpath == file && !(allow_same_ext && file_ext == ext)
|
existing_file_ext = ::File.extname(blob.name).sub(/^\./, '')
|
||||||
|
|
||||||
|
new_file_ext = ::File.extname(path).sub(/^\./, '')
|
||||||
|
|
||||||
|
if downpath == existing_file && !(allow_same_ext && new_file_ext == existing_file_ext)
|
||||||
raise DuplicatePageError.new(dir, blob.name, path)
|
raise DuplicatePageError.new(dir, blob.name, path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user