fix(recomplauncher): saves are the save folders, not Longshot's whole data folder #2364
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2364
Loading…
Reference in a new issue
No description provided.
Delete branch "Xarishark/Longshot:fix/recomplauncher-save-folders"
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?
RecompLauncher backs up and cloud-syncs Longshot's whole data folder instead of its saves: the builder, the launcher,
NVIDIA's DLSS files and the save backups go into every save copy, and a cloud save sends them off the PC.
Hookshot gets the same fix, with its names, in Hookshot#3164.
What changes
Before:
savesnamed{local}/longshotand{install}/Longshot/user.{local}/longshotis$XDG_DATA_HOME/longshoton Linux and%LOCALAPPDATA%\Longshoton Windows, which also hold the builder, thelauncher, NVIDIA's DLSS files, the NFC tags and the save backups (and shaders on Windows). The Saves button opened
%LOCALAPPDATA%\Longshoton Windows until the game folder had auserfolder.After: the folders the game writes when RecompLauncher's Play starts it (
LongshotBuilder.exe --play/longshot-launch, no--user):<user>/save(host/nn_fs.c;<user>/save-workholds a save only while it iswritten, and goes into
saveat Commit) and<user>/mouse_sens.txt(host/nn_hid.c),<user>being{install}/Longshot/useron Windows and{local}/longshoton Linux (host/hos_main.c):The Saves button opens whichever save folder exists, else the game folder.
Copies made before this still restore where they came from. RecompLauncher maps an old copy onto a moved list by
position only when the list keeps its length, and that would put
<user>/save/<id>into<user>/save/save/<id>;with four entries instead of two, each old copy goes back into the folder it was made from.
Testing
Tested:
tests/test_recomplauncher_json.py: 13 pass (10 onmain). New checks: the save list, tied to the lines inhost/nn_fs.c,host/hos_main.candhost/nn_hid.cthat make those folders; the list's length; and the Savesbutton's folders.
repo), with this file:
keeps_copywarnings; its warnings arethe save and settings files not being there before the first Play, and the Linux save folder being outside
{install}/{data}. The setup line with and without the copy is as before this change.save-work,mouse_sens.txt, cache storage) besidea data folder with a builder version, DLSS files, an NFC tag and a save backup in it: the old list copied 12 files,
the half-written
save-work, builder, tag and backup included; this list copies the 5 save files. The same withthe Linux layout.
user/save/<id>, with nosave/save. RecompLauncher does not map the old list onto this one by position (itwould have onto a two-entry list).
Still to test:
tab backup holds only
save/andmouse_sens.txt, and that restoring a backup made before this puts the save back.Risks
RecompLauncher's backups and cloud saves copy what saves names. It named {local}/longshot and {install}/Longshot/user: - {local}/longshot is %LOCALAPPDATA%\Longshot on Windows and $XDG_DATA_HOME/longshot on Linux. Besides the Linux saves it holds the builder, the launcher, NVIDIA's DLSS files, the NFC tags and the save backups, so every save copy carried them, and a cloud save sent them off the PC. - The Saves button opened {local}/longshot on Windows whenever the game folder had no user folder yet. Started by RecompLauncher's Play (the builder's --play, no --user), the game keeps its saves in <user>/save (host/nn_fs.c; <user>/save-work only while one is written) and the mouse sensitivity in <user>/mouse_sens.txt (host/nn_hid.c), <user> being the game folder's user folder on Windows and $XDG_DATA_HOME/longshot on Linux (host/hos_main.c). saves now names those, on both systems, and the Saves button opens whichever save folder there is, else the game folder. Copies made before this go back where they came from: the launcher maps an old copy onto a moved list by position only when the list keeps its length, which would put <user>/save/<id> into <user>/save/save/<id>. This list has four entries, not two.Possibly related, for context:
WIP: fix(recomplauncher): saves are the save folders, not Longshot's whole data folderto fix(recomplauncher): saves are the save folders, not Longshot's whole data folder