fix(storage): deleting the last version offers its build files too #231
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
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
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!231
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:fix/build-files-after-last"
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?
Deleting the last installed version left the build files (compiled code, translations and their stores, often many GB) in the build files folder, and nothing said they were still there. A player who "uninstalls" Longshot this way expects that space back.
Fixes #147
Summary
DeleteViewModel.DeleteNowAsync) checks what is left once no version remains. If the build files folder still holds build files, it opens a new dialog, Delete the build files too?, with their size and folder.Disk.FreeWork, which takes only what make_game made (objcache,sa,exefs,probe,system_headers.txt, the object and lift stores). The folder itself stays (the player may have chosen it, and it may hold other things), and so does anything else in it. Saves and their backups are never in it. The dialog stays open until they're deleted so that no build can start on the folder in the meantime.Storage.LeftAfterLast(work, versionsLeft)in Core makes that decision, so the tests can reach it.Screenshots
New screenshot scene
build-files-left(dotnet run --project tools/screenshots -- <dir> build-files-left); the picture is in the first comment.Testing
python -I tests/test_launcher_core.py: 2604 checks passed. New checks inStorageChecks:saves/folder in itDisk.FreeWorkand never deletes the folderMainWindow.axamlThe translation catalogs now lack 9 more texts, a warning only (the new dialog's English text).
LAUNCHER=$PWD python -I ../Tooling/tests/test_release.py: 3 failures (test_the_bump,test_the_next_stable,test_check_tag_against_the_published_releases). They fail the same way on an unchangedmaincheckout, are about tags and releases, and are unrelated to this change.dotnet build App: 0 warnings, 0 errors.🤖 Generated with Claude Code
Screenshot of the new dialog (scene
build-files-left, drawn headless with a temporary home; no game files):