fix(saves): import from and export to NX2navi work again: only a finished commit in save-tx is a save waiting, and a copy that worked says so on the Saves page #33
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/ui
area/updates
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!33
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:fix/save-import"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Importing saves from NX2navi (and exporting to it) was refused every time with "NX2navi has a save waiting", even right after starting and quitting NX2navi as the message asks. This makes the check look only for a save NX2navi really has waiting, and makes a copy that worked say so on the Saves page too.
Why it was refused
Saves.PendingCommit(Core/Saves.cs) counted any file anywhere underprofile/save-txas a save waiting. But NX2navi keeps more than waiting saves there (itsruntime/fs_host.c, "save transactions"):profile/save-txwork/new/ready-<n>/old/save-backupSo after any normal quit
work/held files, and every copy from or to NX2navi was refused; starting and quitting again just made a newwork/. Now only aready-<n>folder (n from 1, as NX2navi's ownready_numberreads it) counts as a save waiting.What changed
PendingCommitlooks for asave-tx/ready-<n>folder instead of any file undersave-tx.save-tx, and the success message.work/(andnew/,old/, and names that aren't a finished commit, likeready-0or a fileready-2) insave-txand require import and export to go through; the waiting check usesready-0000000003/. With the old rule these checks fail.Screenshots
Made with a headless harness on the real
MainWindow(Linux layout), with a fake NX2navi game folder of one-line text files, withsave-tx/workas NX2navi leaves it.Before: import from NX2navi, refused
After: the import goes through
Back on the Saves page: the imported slots, and the toast
Export to NX2navi
A real finished commit waiting (
save-tx/ready-0000000004) is still refusedTesting
python3 -I tests/test_launcher_core.py --longshot <a Longshot checkout>: launcher core: 634 checks passed. WithPendingCommitput back to the old rule, the new NX2navi check fails.python3 -I tests/test_release.py: Ran 28 tests, OK.save-tx/workpresent succeed, with aready-<n>they're refused. The harness runs the copy with no game counted as running, because a Longshot game was running on the PC at the time; everything else is the app's own code path.Not tested:
runtime/fs_host.canddocs/launcher.md, not from a folder NX2navi wrote. Worth one import on the reporter's PC (Windows or Linux) before release.Follow-ups (not in this PR)
scripts/oot_saves.pypending_commithas the same rule (any file undersave-tx), and so has the same false refusal; itstests/test_oot_saves.pyNX2navi case puts a loose filesave-tx/commitin, which NX2navi never writes. Both should take the sameready-<n>rule in a Longshot PR, to keep the two ports in step.profile/save-importuntil its next start, which then replaces the save. Neither port treats that as a save waiting yet.🤖 Generated with Claude Code