Skip to content

Free the space left by a failed NUP unpack - #1393

Merged
NotRexed merged 1 commit into
NotRexed:mainfrom
bronze-ff:fix/builder-discard-failed-unpack
Nov 10, 2026
Merged

NotRexed merged 1 commit into
NotRexed:mainfrom
bronze-ff:fix/builder-discard-failed-unpack

Conversation

@bronze-ff

@bronze-ff bronze-ff commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

When a fresh NUP unpack fails, the Builder leaves its partially written .game directory in the output folder. The next attempt deletes that staging directory before unpacking anyway.

Remove the staging directory when extraction or validation fails, before the previous game cache is replaced. Keep the original build error and log the staging path if cleanup also fails.

The game-free regression simulates the Builder error from a disk-full unpack and checks that the partial data is gone and the previous cache and save are intact. It also covers a missing ROMFS and an unsupported build. The three cleanup assertions fail on main and pass with this change. The cache, missing-input, and output regression suites passed on Windows and Linux, and the NUP path suite passed on Linux.

Related to #1388, which was closed with disk-space guidance. #1391 measures free space on the destination volume. This change frees the Builder staging space after an unsuccessful unpack.

Compatibility check: tested a clean combined tree with #1391 (destination free-space reporting) and #1395 (interrupted ROMFS copies). The cache, missing-input and output suites passed on Windows and Linux. The NUP path suite also passed on Linux.

Assisted-by: OpenAI Codex
Co-authored-by: Codex <codex@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 54b19ea 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