fix(windows): a launcher in a folder Windows lets no program list, such as Cookies, says to move it #154

Merged
HumanBean merged 1 commit from HumanBean/LongshotLauncher:fix/blocked-folder-1010 into main 2026-11-16 21:33:06 +00:00
Owner

Why

A player whose Desktop sits inside C:\Users\<name>\Cookies couldn't check or build: every check said "The builder's own compiler (tools/llvm-mingw) could not build a test program: no message", and the launcher told them to look at their antivirus, which they had already turned off. Cookies is one of the junctions Windows keeps for old programs, and it lets no program list it; the build tools' clang stops at start there (…\clang.exe: permission denied, exit 1), before it compiles anything. See MagicBeanDev/Longshot#1010.

What changed

Before a game-file check or a build on Windows, the launcher looks at each folder above its build tools. If one can't be listed, it doesn't run the builder and says which folder is in the way and to move Longshot's folder out of it.

  • Core/Disk.cs: Disk.Unlistable(path), the highest folder at or above path that refuses listing (only an access refusal counts).
  • Core/MakeGameRun.cs: MakeGameRun.Blocked(command, windows), the message (Windows only); CheckAsync answers with it as a CheckFailed of this PC's, without running make_game.py.
  • App/ViewModels/BuildStepViewModel.cs: a build stops with it before make_game.py starts.
  • Core/Problems.cs: ProblemKind.BlockedFolder, matched before Antivirus, so the build's problem screen says to move the folder, not to look at the antivirus. It also matches the builder's own words for this from MagicBeanDev/Longshot#1238.

The two new texts aren't translated yet; they show in English until the catalogs are filled.

Testing

Tested: python -I tests/test_launcher_core.py (1378 checks, with new ones for a folder under Cookies, Linux, every folder listable and the builder's words) and python -I tests/test_release.py pass on Linux; the app builds.

Not tested: on Windows. The listing check is the same call clang makes fail (the reporter's PowerShell run: C:\Users\Sanok\Cookies\Desktop\…\clang.exe: permission denied), but nobody has run this launcher from a folder under Cookies yet.

Must be tested: Windows: unzip a portable launcher into C:\LsTest\Launcher, then deny listing the folder above it as Cookies does (icacls C:\LsTest /deny "Everyone:(RD)"; undo with icacls C:\LsTest /remove:d Everyone), start the launcher from C:\LsTest\Launcher and check a game file, expecting "Windows doesn't let programs look inside C:\LsTest…" instead of "could not build a test program: no message".

🤖 Generated with Claude Code

## Why A player whose Desktop sits inside `C:\Users\<name>\Cookies` couldn't check or build: every check said "The builder's own compiler (tools/llvm-mingw) could not build a test program: no message", and the launcher told them to look at their antivirus, which they had already turned off. `Cookies` is one of the junctions Windows keeps for old programs, and it lets no program list it; the build tools' clang stops at start there (`…\clang.exe: permission denied`, exit 1), before it compiles anything. See MagicBeanDev/Longshot#1010. ## What changed Before a game-file check or a build on Windows, the launcher looks at each folder above its build tools. If one can't be listed, it doesn't run the builder and says which folder is in the way and to move Longshot's folder out of it. - `Core/Disk.cs`: `Disk.Unlistable(path)`, the highest folder at or above `path` that refuses listing (only an access refusal counts). - `Core/MakeGameRun.cs`: `MakeGameRun.Blocked(command, windows)`, the message (Windows only); `CheckAsync` answers with it as a CheckFailed of this PC's, without running make_game.py. - `App/ViewModels/BuildStepViewModel.cs`: a build stops with it before make_game.py starts. - `Core/Problems.cs`: `ProblemKind.BlockedFolder`, matched before Antivirus, so the build's problem screen says to move the folder, not to look at the antivirus. It also matches the builder's own words for this from MagicBeanDev/Longshot#1238. The two new texts aren't translated yet; they show in English until the catalogs are filled. ## Testing **Tested:** `python -I tests/test_launcher_core.py` (1378 checks, with new ones for a folder under `Cookies`, Linux, every folder listable and the builder's words) and `python -I tests/test_release.py` pass on Linux; the app builds. **Not tested:** on Windows. The listing check is the same call clang makes fail (the reporter's PowerShell run: `C:\Users\Sanok\Cookies\Desktop\…\clang.exe: permission denied`), but nobody has run this launcher from a folder under `Cookies` yet. **Must be tested:** Windows: unzip a portable launcher into `C:\LsTest\Launcher`, then deny listing the folder above it as `Cookies` does (`icacls C:\LsTest /deny "Everyone:(RD)"`; undo with `icacls C:\LsTest /remove:d Everyone`), start the launcher from `C:\LsTest\Launcher` and check a game file, expecting "Windows doesn't let programs look inside C:\LsTest…" instead of "could not build a test program: no message". 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(windows): a launcher in a folder Windows lets no program list, such as C:\Users\<name>\Cookies, says to move it, before its build tools stop unexplained (Longshot#1010)
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
3742831e3a
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member

Possibly related, for context:

  • issue MagicBeanDev/Longshot#1010 Install: Builder compiler cannot compile test program while checking .nup — Direct issue fixed by this change
Possibly related, for context: - issue MagicBeanDev/Longshot#1010 Install: Builder compiler cannot compile test program while checking .nup — Direct issue fixed by this change
HumanBean changed title from WIP: fix(windows): a launcher in a folder Windows lets no program list, such as Cookies, says to move it to fix(windows): a launcher in a folder Windows lets no program list, such as Cookies, says to move it 2026-11-16 21:32:57 +00:00
HumanBean deleted branch fix/blocked-folder-1010 2026-11-16 21:33:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!154
No description provided.