Revert "fix -o in c2e (#1161)" (#1166)

This reverts commit 9429bed91c.
This commit is contained in:
Alex Xu authored and GitHub committed 2025-11-17 12:04:27 -08:00
1 parent 4c36c7c586
commit 2dbc13303f
1 file changed
+4 -1
+4 -1
View File
@@ -922,8 +922,11 @@ def getOutputFilename(srcpath, wantedname, ext, tomenumber):
if wantedname is not None: if wantedname is not None:
if wantedname.endswith(ext): if wantedname.endswith(ext):
filename = os.path.abspath(wantedname) 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: 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): elif os.path.isdir(srcpath):
filename = srcpath + tomenumber + ext filename = srcpath + tomenumber + ext
else: else: