mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
Multi-file processing broken: only first file is processed #853
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cfsmp3 on GitHub (Dec 14, 2025).
Bug Description
When multiple input files are provided on the command line, only the first file is processed. The remaining files are silently ignored.
Steps to Reproduce
Expected Behavior
All files should be processed and their captions concatenated into a single output file.
Actual Behavior
Only the first file is processed. The output file contains captions only from the first input file.
Evidence
I tested with three files:
When processed together with multi-file input, the output is exactly 26,632 bytes - matching only the first file.
Root Cause
The bug is in
src/rust/src/common.rsat line 216:The problem is that
options.inputfileis of typeOption<Vec<String>>. Calling.iter()on anOptionyields 0 or 1 items (the inner value ifSome), not the contents of theVec. This causesnum_input_filesto always be 1 when there are any input files, regardless of how many files are actually provided.Fix
The correct code should iterate over the Vec contents:
Version
CCExtractor 0.95 (commit
d4949ccf)Note
This bug was discovered while attempting to verify issue #1377 (memory corruption when processing multiple files). That original issue cannot be tested because this bug prevents multiple files from ever being processed.