fix: accurate disk space and drive name on Linux, through links #29

Merged
HumanBean merged 2 commits from HumanBean/LongshotLauncher:fix/disk-space-drive-name into main 2026-11-13 11:01:27 +00:00
Owner

On Linux, a build folder reached through a link was measured on the wrong drive. On Bazzite /home is a link to /var/home, so the launcher reported 0 GB free and wouldn't build. This carries korbo's fix from #27 and fixes the drive name the settings step shows next to it.

What changed

  • Core/Disk.cs (korbo's commit): on Linux, FreeBytes asks the folder's own filesystem (new DriveInfo(dir)), which follows links.
  • Core/Disk.cs (this PR's commit): DriveName still named the mount by the path as written. So on Bazzite the settings step said "N GB free on /" or "/ is too full for the build" while measuring /var. FreeBytes and DriveName now share one step, Existing(): the nearest folder that exists, with every link along the path followed (Real(), as realpath does).
  • tests/launcher_core/ScreenChecks.cs:
    • The link check says why it links to /proc: /proc always reports 0 bytes free, so a check that didn't follow the link would see the test folder's drive instead.
    • It compares against 0.
    • It now also checks that DriveName names /proc through the link.

Testing

  • python -I tests/test_launcher_core.py on Linux (CachyOS): 607 checks pass.
  • With the DriveName change taken out, the new check fails ("A linked folder is named by the drive its free space is measured on.").
  • python -I tests/test_release.py: OK.
  • Not run: the launcher itself on Bazzite, and Windows. The Windows code paths are unchanged.

Co-authored-by: korbo

🤖 Generated with Claude Code

On Linux, a build folder reached through a link was measured on the wrong drive. On Bazzite `/home` is a link to `/var/home`, so the launcher reported 0 GB free and wouldn't build. This carries korbo's fix from https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/27 and fixes the drive name the settings step shows next to it. ## What changed - `Core/Disk.cs` (korbo's commit): on Linux, `FreeBytes` asks the folder's own filesystem (`new DriveInfo(dir)`), which follows links. - `Core/Disk.cs` (this PR's commit): `DriveName` still named the mount by the path as written. So on Bazzite the settings step said "N GB free on /" or "/ is too full for the build" while measuring `/var`. `FreeBytes` and `DriveName` now share one step, `Existing()`: the nearest folder that exists, with every link along the path followed (`Real()`, as realpath does). - `tests/launcher_core/ScreenChecks.cs`: - The link check says why it links to `/proc`: `/proc` always reports 0 bytes free, so a check that didn't follow the link would see the test folder's drive instead. - It compares against 0. - It now also checks that `DriveName` names `/proc` through the link. ## Testing - `python -I tests/test_launcher_core.py` on Linux (CachyOS): 607 checks pass. - With the `DriveName` change taken out, the new check fails ("A linked folder is named by the drive its free space is measured on."). - `python -I tests/test_release.py`: OK. - Not run: the launcher itself on Bazzite, and Windows. The Windows code paths are unchanged. Co-authored-by: korbo 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: accurate disk space check on Linux
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
8837f9a13b
fix: the drive's name follows links too, as its free space does
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
bc123302ad
On Bazzite /home is a link to /var/home. FreeBytes now measures the
filesystem the folder is really on, but DriveName still named the mount
by the path as written, so the settings step said "N GB free on /" (or
"/ is too full") while measuring /var. Both now share one step: the
nearest folder that exists, with every link along it followed.

The check names why it links to /proc (it always reports 0 bytes free)
and also checks the drive's name through the link.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean deleted branch fix/disk-space-drive-name 2026-11-13 11:01:27 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!29
No description provided.