Fix #1879313 [Problem with image name containing capitalization when compressing](https://bugs.launchpad.net/calibre/+bug/1879313)

This commit is contained in:
Kovid Goyal 2020-05-19 08:37:37 +05:30
parent cb011cab48
commit 5f6e4d08ed
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -81,11 +81,12 @@ def compress_images(container, report=None, names=None, jpeg_quality=None, progr
seen = set() seen = set()
num_to_process = 0 num_to_process = 0
for name in sorted(images): for name in sorted(images):
path = os.path.normcase(os.path.abspath(container.get_file_path_for_processing(name))) path = os.path.abspath(container.get_file_path_for_processing(name))
if path not in seen: path_key = os.path.normcase(path)
if path_key not in seen:
num_to_process += 1 num_to_process += 1
queue.put((name, path, container.mime_map[name])) queue.put((name, path, container.mime_map[name]))
seen.add(path) seen.add(path_key)
def pc(name): def pc(name):
keep_going = progress_callback(len(results), num_to_process, name) keep_going = progress_callback(len(results), num_to_process, name)