Skip to content

Protect multi-stream VOB outputs from accidental overwrite - #66

Draft
Blackspirits wants to merge 1 commit into
upl/review-base-fa6dfrom
fix/vob-multistream-overwrite-fa6d
Draft

Protect multi-stream VOB outputs from accidental overwrite#66
Blackspirits wants to merge 1 commit into
upl/review-base-fa6dfrom
fix/vob-multistream-overwrite-fa6d

Conversation

@Blackspirits

@Blackspirits Blackspirits commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

The VOB batch preflight currently protects only the unnumbered base output path. Multi-stream extraction writes numbered pairs such as movie.0.sub/.idx and movie.1.sub/.idx, so an existing numbered output can be overwritten even when --overwrite is not supplied.

This change:

  • moves overwrite protection into VobSubExtractor, after the actual subtitle-stream count and output names are known
  • computes the exact output paths before any stream is written
  • checks both .sub and companion .idx for every resolved output
  • preserves --overwrite behavior
  • removes the misleading best-effort base-path preflight from SubtitleConverter
  • keeps an unused unnumbered base path from blocking a multi-stream extraction
  • adds regressions for numbered-output protection and unused-base-path behavior

Current-base verification

  • the defect is still present on upstream fa6d8623c2adb0c646b6d31a11b221b855339bbe
  • all three affected base files are byte-for-byte identical to the files reviewed for internal PR Protect multi-stream VOB outputs from accidental overwrite #17
  • the reviewed three-file fix was therefore ported exactly onto the current upstream tree, with no conflict resolution or unrelated edits
  • current diff is one commit touching only SubtitleConverter.cs, VobSubExtractor.cs, and VobSubExtractorTest.cs
  • full solution restore passed
  • full solution build passed
  • full solution test suite passed on the first run
  • retry step was not used
  • validation run: #34725292765

Base is current upstream fa6d8623c2adb0c646b6d31a11b221b855339bbe.

This PR supersedes internal draft #17.

AI assistance: ChatGPT was used to independently re-audit the current VOB multi-stream overwrite path, verify that the affected base files are unchanged from the reviewed draft, port the exact fix onto current upstream, and preserve the focused regressions.

Copy link
Copy Markdown
Owner Author

Independent adversarial re-check on current upstream base: confirmed the current CLI still preflights only the unnumbered VOB base path while multi-stream extraction writes numbered pairs. The fix computes actual output names after stream discovery and checks every .sub/.idx pair before any write; --overwrite remains unchanged and an unused base path no longer blocks multi-stream output. Full current-base CI run #34725292765 passed restore/build/full tests on the first run with no retry. No blocker identified. Keep draft; no merge/promotion performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant