fix(windows): concurrent writes of one file, and free space on a drive root #71
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!71
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:fix/windows-file-writes"
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?
On Windows, two launcher processes writing the same file at once (a shortcut's
--playbeside an open launcher, for one) can fail with "access denied". Free space on a drive root was also looked up wrong. This takes over Anarkkie's #64, rebased on main. Anarkkie's branch doesn't allow maintainer edits, so I couldn't push the rebase there.What changed (Anarkkie's commits, unchanged apart from the rebase)
Core/AtomicFile.cs: on Windows, only the final rename over the old file is serialized, by a named mutex per file (Local\, the uppercased full path hashed).<name>.<guid>.tmp).Core/Disk.cs:TrimEndingDirectorySeparator("C:\")keeps its separator, soWithinlooked for the prefixC:\\and never matched a drive root. It now adds a separator only when there isn't one.Core/SelfUpdate.cs: a LinuxAPPIMAGEpath is checked withStartsWith('/'). That's the same answer on Linux, and also right when the checks run on Windows.AtomicChecksruns 4 processes writing the same file, new and existing, on both systems. On Windows it also covers an abandoned owner and a locked file.TestLinksskips only the checks that need to create a symlink, and only on Windows without the symlink privilege. The checks that reject bad links still run everywhere.Shortcuts.Quote.StartPathchecks and the new AppImage checks are both kept inSelfUpdateChecks.docs/tested-configurations.md, a record of one test run; the PR has it.Testing
python -I tests/test_launcher_core.py --strict --longshot <Longshot main>: 994 checks passed (Linux, .NET 10.0.404).python -I tests/test_release.py: 28 OK.Co-authored with Anarkkie (#64).
136c7edd74775a84ba82Anarkkie referenced this pull request2026-11-14 21:14:22 +00:00