Fix file extension case sensitivity
This commit is contained in:
parent
84dda881bc
commit
62170478ca
|
@ -47,9 +47,9 @@ class Stickerizer
|
||||||
# TODO: Change this to check file types instead of relying on filenames
|
# TODO: Change this to check file types instead of relying on filenames
|
||||||
valid = false
|
valid = false
|
||||||
file_info = file_ext(file)
|
file_info = file_ext(file)
|
||||||
valid = true if file_info.extension == '.png'
|
valid = true if file_info.extension.downcase == '.png'
|
||||||
valid = true if file_info.extension == '.jpg'
|
valid = true if file_info.extension.downcase == '.jpg'
|
||||||
valid = true if file_info.extension == '.gif'
|
valid = true if file_info.extension.downcase == '.gif'
|
||||||
puts "File #{file}: valid: #{valid}"
|
puts "File #{file}: valid: #{valid}"
|
||||||
valid
|
valid
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue