Fixed bug in get_next_filename

This commit is contained in:
Matthias@Dell 2023-04-27 01:40:56 +02:00
parent a285fab1a1
commit 04996793b9

View File

@ -23,7 +23,8 @@ def get_next_filename(basename, directory=".", digits=3):
for file in files:
if not file.startswith(basename): continue
try:
number = int(file.split('.')[0].strip(basename))
number = file[:file.rfind('.')].replace(basename, "")
number = int(number)
if number < lowest_number: continue
lowest_number = number
except ValueError: