Skip to content

fix: write temp working files to the OS temp dir, not the edits dir (#24)#30

Merged
TMHSDigital merged 1 commit into
mainfrom
fix/24-temp-files
Jun 16, 2026
Merged

fix: write temp working files to the OS temp dir, not the edits dir (#24)#30
TMHSDigital merged 1 commit into
mainfrom
fix/24-temp-files

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Fixes #24.

Problem

concat (its demuxer list file) and title_card (its drawtext textfile) wrote dotfiles into SCREENCAST_HOME/edits and removed them in a finally. A hard crash between write and cleanup leaked them next to real outputs.

Fix

Add a tempPath() helper in utils/paths.ts that returns a unique path under os.tmpdir(), and route both temp files through it. Normal-path cleanup is unchanged; any leftover after a crash is reaped by the OS.

Verification

  • npm run build, npm run typecheck, npm test pass (131 passed, 5 skipped; +2 tests for tempPath).

🤖 Generated with Claude Code

)

concat (its demuxer list file) and title_card (its drawtext textfile) wrote
dotfiles into SCREENCAST_HOME/edits and removed them in a finally block; a hard
crash leaked them next to real outputs. Route both through a new tempPath()
helper in utils/paths.ts that returns a unique path under os.tmpdir(), so the OS
reaps any leftover. Normal-path cleanup is unchanged.

Fixes #24

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@TMHSDigital TMHSDigital merged commit 9b81b4c into main Jun 16, 2026
6 checks passed
@TMHSDigital TMHSDigital deleted the fix/24-temp-files branch June 16, 2026 18:10
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.

Enhancement: temp filter/list files can leak into the edits dir on a hard crash

1 participant