forked from openlp/openlp
make suffix lower
This commit is contained in:
parent
61b769a064
commit
972140f3ad
@ -371,13 +371,13 @@ def is_not_image_file(file_name):
|
|||||||
``file_name``
|
``file_name``
|
||||||
File name to be checked.
|
File name to be checked.
|
||||||
"""
|
"""
|
||||||
formats = [unicode(fmt)
|
|
||||||
for fmt in QtGui.QImageReader.supportedImageFormats()]
|
|
||||||
if file_name.isEmpty():
|
if file_name.isEmpty():
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
formats = [unicode(fmt).lower()
|
||||||
|
for fmt in QtGui.QImageReader.supportedImageFormats()]
|
||||||
file_part, file_extension = os.path.splitext(unicode(file_name))
|
file_part, file_extension = os.path.splitext(unicode(file_name))
|
||||||
if file_extension[1:] in formats and os.path.exists(file_name):
|
if file_extension[1:].lower() in formats and os.path.exists(file_name):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user