mirror of
https://github.com/ciromattia/kcc
synced 2026-10-21 00:42:33 +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):
|
if os.path.exists(filename):
|
||||||
counter = 0
|
counter = 0
|
||||||
basename = os.path.splitext(filename)[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):
|
while os.path.exists(basename + '_kcc' + str(counter) + ext):
|
||||||
counter += 1
|
counter += 1
|
||||||
filename = basename + '_kcc' + str(counter) + ext
|
filename = basename + '_kcc' + str(counter) + ext
|
||||||
|
|||||||
Reference in New Issue
Block a user