diff --git a/osxphotos/photoinfo.py b/osxphotos/photoinfo.py index a78e93c5..1cbca9c3 100644 --- a/osxphotos/photoinfo.py +++ b/osxphotos/photoinfo.py @@ -616,7 +616,12 @@ class PhotoInfo: # use suffix from the non-edited file actual_suffix = pathlib.Path(self.filename).suffix - if dest.suffix != actual_suffix: + # warn if suffixes don't match but ignore .JPG / .jpeg as + # Photo's often converts .JPG to .jpeg + if dest.suffix != actual_suffix and sorted([dest.suffix, actual_suffix]) != [ + ".JPG", + ".jpeg", + ]: logging.warning( f"Invalid destination suffix: {dest.suffix}, should be {actual_suffix}" ) diff --git a/osxphotos/utils.py b/osxphotos/utils.py index 3ed943cb..7f6ace28 100644 --- a/osxphotos/utils.py +++ b/osxphotos/utils.py @@ -218,6 +218,8 @@ def get_last_library_path(): if photosurlref is not None: # use CFURLCreateByResolvingBookmarkData to de-serialize bookmark data into a CFURLRef + # pylint: disable=no-member + # pylint: disable=undefined-variable photosurl = CoreFoundation.CFURLCreateByResolvingBookmarkData( kCFAllocatorDefault, photosurlref, 0, None, None, None, None )