fix(check): a folder too deep for Windows and a .nx archive are said as such, not as a damaged file (#205) #232
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!232
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:fix/check-deep-folder-nx"
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?
Issue #205's two game-file checks both told the player their file was damaged when it wasn't: one failed because the launcher's folder is too deep for Windows to load Python's own parts, the other because the file is a
.nxarchive, which no released Longshot reads yet. This PR says what is actually wrong and what to do about it.Summary
ImportError: DLL load failed while importing backend_c: The filename or extension is too longcomes from the build tools' Python. Windows won't load a.pydfrom a path of 260 characters or more, and that happens when a portable launcher's data folder sits deep on a drive. Longshot'slong_paths.py(Longshot#1132) covers file opens, but not extension loading. The launcher sent this error to "This file is damaged", because the message containsnup.py stopped.GameCheck.Of: aDLL load failedis now this PC's failure (CheckFailed, ThisPc), never the file's.MakeGameRun.TooDeep: after such a failure on Windows, the launcher measures the tools' Python folder. If a path there is 260 characters or more, the text names that path and its length and says to move Longshot's folder closer to the top of the drive (for example toC:\Longshot). It runs for the game-file check and for a build that stops this way.Problems.LongFolder: the problem page and the check both say "Longshot's folder is too deep" (it also matches Python's English words when nothing could be measured)..nxarchive (#205, second report).not a NUP package (magic b'NXAR')means nup.py was given a real NXFormat.nx. Every Longshot release's build tools read.nuponly, and reading.nxis still the WIP Longshot#685. The launcher used to say "This file is not a .nup or .nx package, or its beginning is damaged". It now says this is a.nxarchive that this version's build tools can't read, and to pick the.nupof the dump instead. No new format is supported here.The new texts aren't in the catalogs yet, so they show in English, like the 347 other recent texts.
Testing
python -I tests/test_launcher_core.py: 2609 checks pass, including new ones. The GameCheck cases cover the NXAR message, Python's English and GermanDLL load failed, and the launcher's own words.TooDeepis checked with a fake 300-character.pyd, a shallow folder, Linux, and another error.Problems.FromBuildgets LongFolder for these and Unknown for unmeasured non-English words.dotnet build App: builds with no warnings.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 unchanged checkout, so this PR doesn't cause them.🤖 Generated with Claude Code
Possibly related, for context: