mirror of
https://github.com/ciromattia/kcc
synced 2026-10-20 16:32:31 +00:00
name duplicated kepubs with kcc0, kcc1, etc
This commit is contained in:
@@ -1113,6 +1113,8 @@ def getOutputFilename(srcpath, wantedname, ext, tomenumber):
|
||||
if os.path.exists(filename):
|
||||
counter = 0
|
||||
basename = os.path.splitext(filename)[0]
|
||||
if ext == '.kepub.epub':
|
||||
basename = os.path.splitext(basename)[0]
|
||||
while os.path.exists(basename + '_kcc' + str(counter) + ext):
|
||||
counter += 1
|
||||
filename = basename + '_kcc' + str(counter) + ext
|
||||
|
||||
Reference in New Issue
Block a user