From 9316d8d673b4c6be9b7714ce858fe8d6b8ce1619 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 Jun 2019 11:21:04 +0530 Subject: [PATCH] Comic Input: Fix incorrect processing of comics with pages that have the same file names in different folders when using the "No process" option. Fixes #1831487 [Private bug](https://bugs.launchpad.net/calibre/+bug/1831487) --- src/calibre/ebooks/conversion/plugins/comic_input.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/conversion/plugins/comic_input.py b/src/calibre/ebooks/conversion/plugins/comic_input.py index f47c200082..f0ef123aaf 100644 --- a/src/calibre/ebooks/conversion/plugins/comic_input.py +++ b/src/calibre/ebooks/conversion/plugins/comic_input.py @@ -140,8 +140,8 @@ class ComicInput(InputFormatPlugin): %comic) if self.opts.no_process: n2 = [] - for page in new_pages: - n2.append(os.path.join(tdir2, os.path.basename(page))) + for i, page in enumerate(new_pages): + n2.append(os.path.join(tdir2, '{} - {}' .format(i, os.path.basename(page)))) shutil.copyfile(page, n2[-1]) new_pages = n2 else: