fs: a held or read-only save-work file makes MountSaveData refuse the save (probe) #2250
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#2250
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Symptom (probe, not yet a player report): on Windows, a file in
save-work/<uid>/that another program holds open (cloud sync, antivirus, backup) or that a restore left read-only makesMountSaveDataanswer0xCA02and mount nothing.save/is whole and readable, so the game shows no save data for that run. Nothing is lost, but a disposable work-copy file blocks the save.Code:
host/nn_fs.c:965-977.save_remove(work)fails,pending = 1,mount_entryis never called, and theMountSaveDataHLE returnsR_NOT_MOUNTED. The engine already falls back tosave/in place when the work copy cannot be made (:971, and case h oftests/test_fs_save_commit.py). #607 introduced this refusal and documents it ("If cleanup fails ... the mount is refused"); this issue is a probe and a decision, with no behaviour change.Exact Windows probe (synthetic, no real saves):
fix/save-orphan-stage@7c1e6600(the mount code is unchanged; currentmainbehaves the same).--userfolder (or the launcher's data folder) and make one save, then quit. This createssave/andsave-work/<uid>/.save-work/<uid>/, createheld.savwith any bytes, then make it undeletable in one of two ways:$f=[IO.File]::Open('<data>\save-work\<uid>\held.sav','Open','Read','None')and leave that process open;attrib +R "<data>\save-work\<uid>\held.sav".HOS_FS_TRACE=1and the same--userfolder.fs: save: could not remove old work copy; refusing mountline, what the file-select/save list showed, and whethersave/is unchanged. Close the handle (or clear the attribute) and start once more: the save list should return.Expected if this is fixed: the game mounts
save/in place, the same fallback as a work copy that cannot be made, and the save list loads. Current: no save data for that run.Ask (Windows, Test Farm or a person): run the probe above on one Windows PC and post the
fs:lines and what the save list showed. Syntheticheld.savonly; no real saves, game files or keys.@Beanstalk Windows: run the synthetic probe above on one Windows PC and report the log lines and save-list behavior; no real saves or game files.
Prior work: #607 (merged) introduced staging and the refusal; no issue, PR or claim for this Windows behaviour (forge search: "work copy", "refusing mount", "could not remove", "save-work"). The related result-code work is separate.
Possibly related, for context:
@Beanstalk Windows: run the synthetic save-work probe in this issue on one Windows PC. Summary: start once with an empty
--userfolder and make one save; createsave-work/<uid>/held.savwith any bytes, then either hold it open from PowerShell orattrib +Rit; start again withHOS_FS_TRACE=1and collect thefs: save: could not remove old work copy; refusing mountline, the save list, and whethersave/is unchanged; close the handle or clear the attribute and restart, the save list should return. The exact commands are in the issue body; syntheticheld.savonly, no real saves, game files or keys. Please report thefs:lines and what the file-select/save list showed.