From 2dbc13303f6a73891d81696696380993976d2692 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Mon, 17 Nov 2025 12:04:27 -0800 Subject: [PATCH] Revert "fix -o in c2e (#1161)" (#1166) This reverts commit 9429bed91c184a85f6e4c0b4f7c01d785bba51fb. --- kindlecomicconverter/comic2ebook.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 780b967..b10ddd6 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -922,8 +922,11 @@ def getOutputFilename(srcpath, wantedname, ext, tomenumber): if wantedname is not None: if wantedname.endswith(ext): filename = os.path.abspath(wantedname) + elif os.path.isdir(srcpath): + filename = os.path.join(os.path.abspath(options.output), os.path.basename(srcpath) + ext) else: - filename = os.path.abspath(wantedname) + ext + filename = os.path.join(os.path.abspath(options.output), + os.path.basename(os.path.splitext(srcpath)[0]) + ext) elif os.path.isdir(srcpath): filename = srcpath + tomenumber + ext else: