Repository navigation
CI validation (draft): preserve subtitles if atomic temp creation fails - #170
Draft
Blackspirits wants to merge 4 commits into
Draft
Blackspirits wants to merge 4 commits into
Blackspirits wants to merge 4 commits into
Conversation
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI-only draft in personal fork — do not merge.
On upstream baseline
SubtitleEdit/subtitleedit@5e673e4c6fbbaaa6b851270eaf6338a5c924878b,seconv'sAtomicFileWriter.Writewould useFileMode.Createdirectly on the destination when creating a temp file raised IOException or UnauthorizedAccessException, which could truncate a subtitle file on a later write failure.Change: remove unsafe direct-write fallback. Keep atomic writing when possible, otherwise propagate the original failure without modifying the destination. A narrow internal factory overload enables deterministic I/O failure tests. Regression tests cover both exception classes with an existing file, and failure to create a new output. Existing normal-save, interrupted-save and symlink behavior tests remain.
Trade-off: saving now fails instead of falling back to a non-atomic write when the folder is unwritable but the destination itself is writable; preserving data is the intentional priority.
Validation pending: CI build/tests, independent review. This fork-only PR is only to run checks before upstream consideration; no merge authorization.