Skip to content

A game's own build folder is never taken as the player's copy (#215) - #302

Merged
elripalda merged 1 commit into
elripalda:mainfrom
Xarishark:fix/remove-kept-copy-adoption
Nov 18, 2026
Merged

elripalda merged 1 commit into
elripalda:mainfrom
Xarishark:fix/remove-kept-copy-adoption

Conversation

@Xarishark

@Xarishark Xarishark commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the failure in #215 where Hookshot and Longshot fail to build again after an update, and players end up renaming .longshot_exefs by hand and rebuilding from scratch.

What went wrong. Beta 63 (dea0273) let a game built from the player's copy fall back to its own build folder when the original .nup had moved. Any folder with a hidden .name_exefs passed the copy check, and the saved copy was rewritten to point at the build folder. Play kept working, but the next build ran the builder with --game {install}/Longshot --out {install}/Longshot: its own output as its input. Hookshot's and Longshot's builders only take a folder with plain exefs and romfs, so they refuse it.

Why remove it instead of patching it. That hidden folder is the builder's private layout, not a standard: the launcher shouldn't guess it, and it shouldn't rewrite the player's choice to make a game look set up. It also treated an unplugged drive as a deleted copy and replaced the saved path for good.

What this does.

  • Removes adopt_kept_copies, kept_copy, and the .name_exefs guess in nup.rs. Only a .nup, or a folder with exefs/main, is a copy again.
  • No migration. A saved copy that points at a build folder fails Play's existing re-check, which asks the player to pick their copy again. Picking the same .nup should mean a short build: the builder skips re-reading a .nup it already unpacked.
  • New test: a game's build folder is refused as a copy, and the player isn't pointed to it.

The proper way for a game to play without its copy is its manifest listing prepare.done, the files a finished build has. Play already starts a built game without asking for the copy when those are there. Hookshot and Longshot don't list them yet; PRs for both projects are coming, along with a launcher flag for builders that can build again from what they keep.

For players (patch notes): Hookshot and Longshot no longer fail to build after an update when your copy of the game was moved. If the launcher asks for your copy once, pick your .nup again.

Tested: Rust and UI tests pass on Bazzite (Linux: 723 Rust, 352 UI) and Windows 11 (684 Rust, the full suite twice in a row; UI tests pass). Not run on macOS.

…lda#215)

Beta 63 made a game built from the player's copy adopt its own build folder as that copy when the
original was moved: any folder with a hidden ".name_exefs" passed the copy check, and the saved
copy was rewritten to point at it. The next build then handed the builder its own output as its
input (--game {install}/Longshot --out {install}/Longshot), which Hookshot's and Longshot's
builders refuse, and players renaming the hidden folder by hand forced a full rebuild.

That folder is the builder's private layout, not the player's copy, so the launcher no longer
guesses it: adopt_kept_copies, kept_copy and the ".name_exefs" guess in nup.rs are gone, and only
a .nup or a folder with exefs/main is a copy. A saved copy that points at a build folder fails
Play's existing re-check, which asks the player to pick their copy again. A game that plays
without its copy says so in its manifest (prepare.done).
@elripalda
elripalda merged commit 782c81d into elripalda:main Nov 18, 2026
9 of 10 checks passed
Xarishark added a commit to Xarishark/RecompLauncher that referenced this pull request Nov 19, 2026
Main's elripalda#302 deleted Profile::game_folders beside the new kept_from_copy: kept_from_copy stays, game_folders goes.
@Xarishark
Xarishark deleted the fix/remove-kept-copy-adoption branch November 23, 2026 23:56
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