Fix fusion output location (#1355)

* Fix fusion output location

Use source folder when output folder is not specified

* undelete things
This commit is contained in:
フィルターペーパー
2026-05-25 16:41:36 -07:00
committed by GitHub
parent df3d174437
commit 08070cdd97
2 changed files with 8 additions and 2 deletions
+3
View File
@@ -393,7 +393,10 @@ class WorkerThread(QThread):
for job in currentJobs: for job in currentJobs:
bookDir.append(job) bookDir.append(job)
try: try:
fusion_source_parent = str(Path(bookDir[0]).parent)
comic2ebook.options = comic2ebook.checkOptions(copy(options)) comic2ebook.options = comic2ebook.checkOptions(copy(options))
if options.output is None:
options.output = fusion_source_parent
currentJobs.clear() currentJobs.clear()
currentJobs.append(comic2ebook.makeFusion(bookDir)) currentJobs.append(comic2ebook.makeFusion(bookDir))
MW.addMessage.emit('Created fusion at ' + currentJobs[0], 'info', False) MW.addMessage.emit('Created fusion at ' + currentJobs[0], 'info', False)
+4 -1
View File
@@ -76,12 +76,15 @@ def main(argv=None):
print('No matching files found.') print('No matching files found.')
return 1 return 1
if options.filefusion: if options.filefusion:
fusion_source_parent = str(Path(sources[0]).parent)
fusion_path = makeFusion(list(sources)) fusion_path = makeFusion(list(sources))
sources.clear() sources.clear()
sources.append(fusion_path) sources.append(fusion_path)
for source in sources: for source in sources:
source = source.rstrip('\\').rstrip('/') source = source.rstrip('\\').rstrip('/')
options = copy(args) options = copy(args)
if options.filefusion and options.output is None:
options.output = fusion_source_parent
options = checkOptions(options) options = checkOptions(options)
print('Working on ' + source + '...') print('Working on ' + source + '...')
makeBook(source) makeBook(source)
@@ -1684,7 +1687,7 @@ def makeFusion(sources: List[str]):
start = perf_counter() start = perf_counter()
first_path = Path(sources[0]) first_path = Path(sources[0])
if True: if options.tempdir:
fusion_parent = first_path.parent fusion_parent = first_path.parent
else: else:
# LLL is after KCC # LLL is after KCC