New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the image importer in case of upper case letters in the suffix #579

Merged
merged 1 commit into from May 20, 2015

Conversation

Projects
None yet
3 participants
@grigorisg9gr
Member

grigorisg9gr commented May 18, 2015

Fix the image importer in case of upper case letters in the suffix, e.g. name.JPG image.

@jabooth jabooth added the in progress label May 18, 2015

@@ -630,6 +630,9 @@ def importer_for_filepath(filepath, extensions_map, importer_kwargs=None):
"""
suffix = ''.join(filepath.suffixes)
if suffix.isupper():
# If for some reason the ending is in capital letters, make them lower case first.
suffix = suffix.lower()

This comment has been minimized.

@patricksnape

patricksnape May 19, 2015

Contributor

we could just always do this? Instead of even bothering with the check? @jabooth?

@patricksnape

This comment has been minimized.

Contributor

patricksnape commented May 20, 2015

Fine with me - I think the isupper check will be faster than calling tolower every time (although the whole thing is pretty negligible)

patricksnape added a commit that referenced this pull request May 20, 2015

Merge pull request #579 from grigorisg9gr/uppercase_importer
Fix the image importer in case of upper case letters in the suffix

@patricksnape patricksnape merged commit a435d78 into menpo:master May 20, 2015

3 checks passed

clahub All contributors have signed the Contributor License Agreement.
Details
continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@grigorisg9gr grigorisg9gr deleted the grigorisg9gr:uppercase_importer branch May 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment