1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-12 17:26:23 +00:00

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

This reverts commit 9429bed91c.
This commit is contained in:
Alex Xu
2025-11-17 12:04:27 -08:00
committed by GitHub
parent 4c36c7c586
commit 2dbc13303f

View File

@@ -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: