Skip to content

Commit

Permalink
list the enumerate
Browse files Browse the repository at this point in the history
  • Loading branch information
axu2 authored Jun 26, 2023
1 parent d033911 commit a3323d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kindlecomicconverter/comic2ebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,8 @@ def getPanelViewSize(deviceres, size):
def sanitizeTree(filetree):
chapterNames = {}
for root, dirs, files in os.walk(filetree, False):
for i, name in enumerate(files):
# only iterate over original files before renaming
for i, name in list(enumerate(files)):
splitname = os.path.splitext(name)
newKey = os.path.join(root, f'{i:04}' + splitname[1])
key = os.path.join(root, name)
Expand Down

0 comments on commit a3323d7

Please sign in to comment.