Fix file extension case sensitivity

This commit is contained in:
reimage 2019-06-17 08:44:01 -07:00
parent 84dda881bc
commit 62170478ca

View file

@ -47,9 +47,9 @@ class Stickerizer
# TODO: Change this to check file types instead of relying on filenames
valid = false
file_info = file_ext(file)
valid = true if file_info.extension == '.png'
valid = true if file_info.extension == '.jpg'
valid = true if file_info.extension == '.gif'
valid = true if file_info.extension.downcase == '.png'
valid = true if file_info.extension.downcase == '.jpg'
valid = true if file_info.extension.downcase == '.gif'
puts "File #{file}: valid: #{valid}"
valid
end