Skip to content

fix: keep interrupted ROMFS copies out of the destination - #1395

Merged
NotRexed merged 1 commit into
NotRexed:mainfrom
JooaoPedro15:fix/romfs-interrupted-copy
Nov 10, 2026
Merged

NotRexed merged 1 commit into
NotRexed:mainfrom
JooaoPedro15:fix/romfs-interrupted-copy

Conversation

@JooaoPedro15

Copy link
Copy Markdown
Contributor

When the Builder receives extracted ROMFS folders on a different drive, a hard link fails and it copies each asset. An interrupted copy leaves a partial file at the final path. A retry skips that path because it already exists.

Stage each fallback copy beside its destination and move it into place after the copy and metadata update succeed. Clean up failed stages, including copies that inherited a read-only attribute on Windows. Existing destination assets still follow the Builder's resume policy.

Game-free fixtures simulate a cross-volume disk-full error, then retry and check the complete asset and an existing destination file. A second test simulates a denied replacement of a read-only copy. All ten cases in tests/test_make_game_cache.py passed on macOS. Windows execution is pending CI.

AI assistance from OpenAI Codex is recorded in the commit trailers.

Stage the fallback copy next to the destination and move it into place after the copy and metadata update succeed. Remove the temporary file on failure, including when copied metadata made it read-only on Windows.

Game-free fixtures cover a disk-full failure followed by a successful retry, and a denied final replacement of a read-only file.

Assisted-by: OpenAI Codex
Co-Authored-By: Codex <noreply@openai.com>
@NotRexed

Copy link
Copy Markdown
Owner

This landed in the v2.0.12 branch (merged there for testing; it reaches main with that release), so closing. Thanks!

@NotRexed NotRexed closed this Nov 10, 2026
@NotRexed

Copy link
Copy Markdown
Owner

Reopened: closing this was a mistake on my side. It was tested in the v2.0.12 branch, and it will be merged into main here, so it shows as merged. Sorry for the noise.

@NotRexed NotRexed reopened this Nov 10, 2026
@NotRexed
NotRexed merged commit 053afd6 into NotRexed:main Nov 10, 2026
21 checks passed
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.

2 participants