fix(fs): a long path with a doubled separator opens: the cutscenes' voices in a deep game folder #1346

Merged
HumanBean merged 3 commits from cuecuemoar/Longshot:fix/long-path-doubled-separator into main 2026-11-17 18:21:25 +00:00
Contributor

Type: fix · Risk: low · Tested on: Windows 10, RTX 4090 · Needs: none

Why

On Windows, when the game folder sits deep enough in the disk (a long path, as a portable launcher's folders easily give), the voices of the cutscenes are silent: subtitles, music and effects go on, the spoken lines are missing. Fixes #1298. See #982 (voices missing in every cutscene on Windows; no path in that report, so not known to be the same).

How to reproduce

Seen on: Windows 10 22H2, RTX 4090, NVIDIA 617.42 (the report: Windows 11, RTX 4070 SUPER, nightly-351)
Settings and switches: defaults; HOS_FS_TRACE=1 to see it in the log; the game's files in a folder long enough for a voice file's path to reach 240 characters (here --romfs a folder 163 characters long)
Steps: start a new game from the title and let the opening in Kokiri Forest play
Expected: the opening's voice files open and its lines are spoken
Actual: on main each is fs: OpenFile(content://Voice/Resource//Stream/...): not found

What changed

The game asks for its streamed voices with a doubled separator, Voice/Resource//Stream/<name>.bwav. Windows tidies that in an ordinary path. From 240 characters fs_wide (host/nn_fs.c) gives the path the extended-length prefix \\?\ so that it may pass 260, and under that prefix Windows takes a path as it is: a doubled separator is an invalid name (ERROR_INVALID_NAME, 123). So the same request opens in a short game folder and is "not found" in a long one, and only the voices, the one place with the doubled separator, go missing.

  • fs_wide (host/nn_fs.c, Windows only): under the prefix a run of separators becomes one, where each / already became a \. Short paths, and paths that come with the prefix already, are as they were.
  • The check: tests/test_fs_path_utf8.py (Windows; its own commit before the fix) makes a real folder past 240 characters, opens a file in it through fs_wide with the separator doubled as the game does, and checks the paths fs_wide gives for a drive and a UNC path with doubled and mixed separators, and that a short path is left alone.
  • Runs: docs/tested/2026-11-16-long-path-voices-cuecuemoar-run01.md and run02.

Measurements

Verdict: fixed: from a game folder at a long path the opening's voice files open with this change and are not found on main (the game's log); the game-free check fails on main with the same Windows error as the report and passes here. Nothing to measure for speed: one pass over a path that is already being converted, long paths only.

Hardware: Windows 10 Pro 22H2 (19045), RTX 4090 24 GB, NVIDIA 617.42, Core i9-13900K, 32 GB
Scene: a new game from the title, the opening in Kokiri Forest (Dm_Kokiri_0000), English voices
Method: headless through the control bridge with HOS_FS_TRACE=1, one run of each build; --romfs a folder 163 characters long (a junction to the build's own romfs), which puts the opening's voice files at 252 characters; the lines the log has for Voice/Resource//Stream, and every "not found" of the two logs compared
How to reproduce: as in How to reproduce

Before: main @ e090cc48 After: this PR @ ffe04eab
The opening's voice files (fs: OpenFile(content://Voice/Resource//Stream/...)) 5 asked for, 5 not found 3 asked for before the run was ended, 3 opened
Files not found in one run and not the other those 5 none
tests/test_fs_path_utf8.py on Windows (main @ 544229a2 with the test commit 6f4871f1; this PR @ ffe04eab) FAIL: the open gives error 123 PASS

Baseline: main e090cc48 is the dev_packs.py base on this PC; the fix's build is main 544229a2 plus this change, as a pack over it. fs_wide is the same on e090cc48 and 544229a2.

main @ e090cc48, HOS_FS_TRACE=1, the game's files under a 163-character folder:
[hos AudioUserTaskThread] fs: OpenFile(content://Sound/Resource/Stream/Dm_Kokiri_0000.bwav)
[hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_000_b.bwav): not found
[hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_001_b.bwav): not found
(the same for Text_002, Text_003 and Text_004)

this PR @ ffe04eab, the same:
[hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_000_b.bwav)
[hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_001_b.bwav)
[hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_002_b.bwav)

tests/test_fs_path_utf8.py, main @ 544229a2 + 6f4871f1 (the test alone):
a long path with a doubled separator did not open: error 123, \\?\C:\...\Voice\Resource\\Stream\voice.bwav
FAIL: !error at line 70

this PR @ ffe04eab:
PASS: actual nn::fs conversions: ASCII, Unicode, long drive/UNC paths, a doubled separator in one (and a real file opened so), both directory names (ACP 1252)

Flags and settings

None.

Testing

Tested:

  • In the game, headless (the control bridge; Windows 10 22H2, RTX 4090): main and the fix's build, each from a game folder at a long path, a new game's opening: as in Measurements. Both runs closed normally.
  • tests/test_fs_path_utf8.py on Windows (llvm-mingw's clang): failing on main for the report's reason, passing here; and against broken fixes, each failing: the run of separators not made one (two ways), and a / no longer made a \.
  • The other checks that read host/nn_fs.c, on Linux (WSL): test_fs_links, test_guest_copies and test_options_path pass; test_longshot_saves fails and test_vcore_fs_open finds no clang++, both the same on main.
  • host/nn_fs.c compiled whole for Windows in the pack's build (llvm-mingw, no warning: in its log). The change is inside #ifdef _WIN32: Linux does not compile it.
  • python -I -B tests/run_all.py on Linux (WSL, Ubuntu 22.04), main @ 544229a2 and this branch side by side: 564 passed, 49 failed, 108 skipped on each, the same 49 checks failing (this WSL machine has no clang, Vulkan headers or some Python modules). tests/test_fs_path_utf8.py is skipped there (Windows only): it was run on Windows as above.

Not tested:

  • By ear: the runs were headless, so the evidence is the files opening, not the lines heard.
  • Japanese voices and the Twinrova cutscene of the report (the same request and code path, another file name); a UNC game folder in the game (the check covers the path fs_wide gives for one).
  • Other things Windows does not tidy under the prefix, such as a .. in the folder the game is given: not looked at here; the game's own paths can't hold one (guest_path_ok).
  • The Test Farm.

Must be tested:

  • None.

Risks

What could break: only paths of 240 characters and more change, and only where they hold a doubled separator, which did not open at all before.

Turning it off: revert the commit.

Compatibility: Nothing changes: no save, option, cache or interface is touched.

Issues

Fixes #1298
See #982

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A file in docs/tested/ for each new measured run (format in docs/tested-configurations.md).
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VxeaZkuxWxPjY31qDxgN1k

**Type:** fix · **Risk:** low · **Tested on:** Windows 10, RTX 4090 · **Needs:** none ## Why On Windows, when the game folder sits deep enough in the disk (a long path, as a portable launcher's folders easily give), the voices of the cutscenes are silent: subtitles, music and effects go on, the spoken lines are missing. Fixes #1298. See #982 (voices missing in every cutscene on Windows; no path in that report, so not known to be the same). ## How to reproduce **Seen on:** Windows 10 22H2, RTX 4090, NVIDIA 617.42 (the report: Windows 11, RTX 4070 SUPER, nightly-351) **Settings and switches:** defaults; `HOS_FS_TRACE=1` to see it in the log; the game's files in a folder long enough for a voice file's path to reach 240 characters (here `--romfs` a folder 163 characters long) **Steps:** start a new game from the title and let the opening in Kokiri Forest play **Expected:** the opening's voice files open and its lines are spoken **Actual:** on main each is `fs: OpenFile(content://Voice/Resource//Stream/...): not found` ## What changed The game asks for its streamed voices with a doubled separator, `Voice/Resource//Stream/<name>.bwav`. Windows tidies that in an ordinary path. From 240 characters `fs_wide` (`host/nn_fs.c`) gives the path the extended-length prefix `\\?\` so that it may pass 260, and under that prefix Windows takes a path as it is: a doubled separator is an invalid name (`ERROR_INVALID_NAME`, 123). So the same request opens in a short game folder and is "not found" in a long one, and only the voices, the one place with the doubled separator, go missing. - **`fs_wide`** (`host/nn_fs.c`, Windows only): under the prefix a run of separators becomes one, where each `/` already became a `\`. Short paths, and paths that come with the prefix already, are as they were. - **The check:** `tests/test_fs_path_utf8.py` (Windows; its own commit before the fix) makes a real folder past 240 characters, opens a file in it through `fs_wide` with the separator doubled as the game does, and checks the paths `fs_wide` gives for a drive and a UNC path with doubled and mixed separators, and that a short path is left alone. - **Runs:** `docs/tested/2026-11-16-long-path-voices-cuecuemoar-run01.md` and `run02`. ## Measurements **Verdict:** fixed: from a game folder at a long path the opening's voice files open with this change and are not found on main (the game's log); the game-free check fails on main with the same Windows error as the report and passes here. Nothing to measure for speed: one pass over a path that is already being converted, long paths only. Hardware: Windows 10 Pro 22H2 (19045), RTX 4090 24 GB, NVIDIA 617.42, Core i9-13900K, 32 GB Scene: a new game from the title, the opening in Kokiri Forest (`Dm_Kokiri_0000`), English voices Method: headless through the control bridge with `HOS_FS_TRACE=1`, one run of each build; `--romfs` a folder 163 characters long (a junction to the build's own `romfs`), which puts the opening's voice files at 252 characters; the lines the log has for `Voice/Resource//Stream`, and every "not found" of the two logs compared How to reproduce: as in How to reproduce | | Before: main @ e090cc48 | After: this PR @ ffe04eab | |---|---|---| | The opening's voice files (`fs: OpenFile(content://Voice/Resource//Stream/...)`) | 5 asked for, 5 `not found` | 3 asked for before the run was ended, 3 opened | | Files not found in one run and not the other | those 5 | none | | `tests/test_fs_path_utf8.py` on Windows (main @ 544229a2 with the test commit 6f4871f1; this PR @ ffe04eab) | FAIL: the open gives error 123 | PASS | Baseline: main e090cc48 is the `dev_packs.py` base on this PC; the fix's build is main 544229a2 plus this change, as a pack over it. `fs_wide` is the same on e090cc48 and 544229a2. ``` main @ e090cc48, HOS_FS_TRACE=1, the game's files under a 163-character folder: [hos AudioUserTaskThread] fs: OpenFile(content://Sound/Resource/Stream/Dm_Kokiri_0000.bwav) [hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_000_b.bwav): not found [hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_001_b.bwav): not found (the same for Text_002, Text_003 and Text_004) this PR @ ffe04eab, the same: [hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_000_b.bwav) [hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_001_b.bwav) [hos AudioUserTaskThread] fs: OpenFile(content://Voice/Resource//Stream/USen_EventFlowMsg-_Dm_Kokiri_0000--Dm_Kokiri_0000_Text_002_b.bwav) tests/test_fs_path_utf8.py, main @ 544229a2 + 6f4871f1 (the test alone): a long path with a doubled separator did not open: error 123, \\?\C:\...\Voice\Resource\\Stream\voice.bwav FAIL: !error at line 70 this PR @ ffe04eab: PASS: actual nn::fs conversions: ASCII, Unicode, long drive/UNC paths, a doubled separator in one (and a real file opened so), both directory names (ACP 1252) ``` ### Flags and settings None. ## Testing **Tested:** - In the game, headless (the control bridge; Windows 10 22H2, RTX 4090): main and the fix's build, each from a game folder at a long path, a new game's opening: as in Measurements. Both runs closed normally. - `tests/test_fs_path_utf8.py` on Windows (llvm-mingw's clang): failing on main for the report's reason, passing here; and against broken fixes, each failing: the run of separators not made one (two ways), and a `/` no longer made a `\`. - The other checks that read `host/nn_fs.c`, on Linux (WSL): `test_fs_links`, `test_guest_copies` and `test_options_path` pass; `test_longshot_saves` fails and `test_vcore_fs_open` finds no clang++, both the same on main. - `host/nn_fs.c` compiled whole for Windows in the pack's build (llvm-mingw, no `warning:` in its log). The change is inside `#ifdef _WIN32`: Linux does not compile it. - `python -I -B tests/run_all.py` on Linux (WSL, Ubuntu 22.04), main @ 544229a2 and this branch side by side: 564 passed, 49 failed, 108 skipped on each, the same 49 checks failing (this WSL machine has no clang, Vulkan headers or some Python modules). `tests/test_fs_path_utf8.py` is skipped there (Windows only): it was run on Windows as above. **Not tested:** - By ear: the runs were headless, so the evidence is the files opening, not the lines heard. - Japanese voices and the Twinrova cutscene of the report (the same request and code path, another file name); a UNC game folder in the game (the check covers the path `fs_wide` gives for one). - Other things Windows does not tidy under the prefix, such as a `..` in the folder the game is given: not looked at here; the game's own paths can't hold one (`guest_path_ok`). - The Test Farm. **Must be tested:** - None. ## Risks **What could break:** only paths of 240 characters and more change, and only where they hold a doubled separator, which did not open at all before. **Turning it off:** revert the commit. **Compatibility:** Nothing changes: no save, option, cache or interface is touched. ## Issues Fixes #1298 See #982 ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A file in `docs/tested/` for each new measured run (format in `docs/tested-configurations.md`). - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VxeaZkuxWxPjY31qDxgN1k
The game asks for its streamed voices as Voice/Resource//Stream/...: tests/test_fs_path_utf8.py makes a real folder
past 240 characters and opens a file in it through fs_wide with the separator doubled, and checks the path fs_wide
gives. On main the open fails with ERROR_INVALID_NAME (123), as in Longshot #1298.

Assisted-by: Claude Code
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZkuxWxPjY31qDxgN1k
The game asks for its streamed voices as Voice/Resource//Stream/..., the separator doubled. Windows tidies that in an
ordinary path, but not under the extended-length prefix fs_wide adds from 240 characters, where it is an invalid name
(ERROR_INVALID_NAME): in a game folder deep enough for the voices' paths to pass 240 characters, their files were
"not found" and the cutscenes silent, while shorter paths in the same folder (music, effects) opened.

Under the prefix fs_wide now makes a run of separators one, as it already made each / a \. Short paths are as they
were.

Fixes #1298

Assisted-by: Claude Code
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZkuxWxPjY31qDxgN1k
docs(tested): the opening's voices from a game folder at a long path, main and the fix
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/windows 0/1 pass, 0 running, 0 queued
c368256973
Assisted-by: Claude Code
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZkuxWxPjY31qDxgN1k
Author
Contributor

Tested in game: RTX 4090, NVIDIA 617.42, Windows 10 22H2, headless through the control bridge with HOS_FS_TRACE=1, the game's files under a 163-character folder: a new game's opening in Kokiri Forest. main @ e090cc48: its 5 voice files 'not found'. This change's build (ffe04eab, a pack over that base): the voice files open, no other difference in the files not found. Not listened to.

Tested in game: RTX 4090, NVIDIA 617.42, Windows 10 22H2, headless through the control bridge with HOS_FS_TRACE=1, the game's files under a 163-character folder: a new game's opening in Kokiri Forest. main @ e090cc48: its 5 voice files 'not found'. This change's build (ffe04eab, a pack over that base): the voice files open, no other difference in the files not found. Not listened to.
cuecuemoar changed title from WIP: fix(fs): a long path with a doubled separator opens: the cutscenes' voices in a deep game folder to fix(fs): a long path with a doubled separator opens: the cutscenes' voices in a deep game folder 2026-11-17 04:46:48 +00:00
TrashPanda approved these changes 2026-11-17 05:11:46 +00:00
TrashPanda left a comment

Cutscene voices in a deep game folder open again on Windows. I read head c3682569. The code is ffe04eab; the later commit only records the runs. It merges, and I approve it.

fs_wide adds \\?\ once a path reaches 240 characters. Under that prefix Windows keeps a doubled separator, and the streamed voices ask for Voice/Resource//Stream. That open works in a short folder and returns error 123 in a long one, so those lines are silent. The new pass turns each / into \ and a run of separators into one, and only on a path that received the prefix. A short path is left as it was, for Windows to tidy. A path that already starts with \\?\ is unchanged. The prefix itself is not part of the pass, so \\?\UNC\server\share keeps the slash after UNC.

The check builds a real folder past 240 characters and opens a file in it with the separator doubled, and it checks a long drive path, a long UNC path, and that a short path is left alone. On Windows it fails on main with error 123 and passes here.

Windows 10, RTX 4090, a game folder long enough that the voice paths pass 240 characters: on main the opening's voice files were not found, and with this change the ones the run asked for opened. The run was headless, so the lines were not heard. Must be tested is None. #982 is voices missing with no path named, so this may not be that report.

Cutscene voices in a deep game folder open again on Windows. I read head `c3682569`. The code is `ffe04eab`; the later commit only records the runs. It merges, and I approve it. `fs_wide` adds `\\?\` once a path reaches 240 characters. Under that prefix Windows keeps a doubled separator, and the streamed voices ask for `Voice/Resource//Stream`. That open works in a short folder and returns error 123 in a long one, so those lines are silent. The new pass turns each `/` into `\` and a run of separators into one, and only on a path that received the prefix. A short path is left as it was, for Windows to tidy. A path that already starts with `\\?\` is unchanged. The prefix itself is not part of the pass, so `\\?\UNC\server\share` keeps the slash after `UNC`. The check builds a real folder past 240 characters and opens a file in it with the separator doubled, and it checks a long drive path, a long UNC path, and that a short path is left alone. On Windows it fails on main with error 123 and passes here. Windows 10, RTX 4090, a game folder long enough that the voice paths pass 240 characters: on main the opening's voice files were not found, and with this change the ones the run asked for opened. The run was headless, so the lines were not heard. Must be tested is None. #982 is voices missing with no path named, so this may not be that report.
Owner

I reviewed this against current main for the v3.0.0 release (an agent working for HumanBean). I read the code only and pushed nothing. No checks were run on this PC. Forgejo's CI runs them, but its jobs on c3682569 are still waiting on "Blocked by required conditions": a fork's runs need a maintainer to approve them. tests/test_fs_path_utf8.py is Windows-only either way.

The fix is right for #1298.

  • host_path leaves the game's Voice/Resource//Stream/... as it is. guest_path_ok skips a run of /, so it lets the doubled separator through.
  • fs_wide then prefixes \\?\ from 240 characters, and Windows doesn't tidy anything under that prefix.
  • The new pass only runs on paths that got the prefix. It writes in place behind the read pointer and starts after the prefix, so \\?\UNC\server keeps its first \. It turns a / into a \ and a run of separators into one.
  • Short paths and paths that already have \\?\ are as before.

What it doesn't normalise: . and .. segments, and a trailing dot or space on a segment. A short path gets these tidied by Windows; under the prefix they are taken literally. The game's own paths can't contain them, because guest_path_ok refuses them. The root folders come from the exe's folder (beside_romfs) or %APPDATA%, and those have none. So only a hand-typed --romfs/--user like C:\a\..\b that is also long would hit it. I don't think that should hold this PR before the release. A follow-up could normalise the whole path with GetFullPathNameW before adding the prefix, which is what os.path.abspath already does for nup.py/make_game.py's long_path. I didn't add it here because it would make the in-game run stale.

Other places that build \\?\ paths:

  • nx2/nup.py and nx2/make_game.py long_path call abspath first (GetFullPathNameW), so their paths are normalised.
  • hos_crash_dialog.c and vk_bug_report.cpp only remove the prefix.
  • hos_fs_host_path has no callers.
  • tests/test_utf8_paths.py doesn't read nn_fs.c.

Nothing else needs this change.

Branch: host/nn_fs.c and tests/test_fs_path_utf8.py haven't changed on main since the merge base 544229a2, and the PR merges as it is. I don't think it needs a rebase.

A side finding, not for this PR: mods.c lower_slash keys voice/resource//stream/... with the doubled /, so a mod's replacement voice file probably never matches, on any OS. It's worth an issue of its own.

#982 is very likely the same bug. That log mounts content: at %USERPROFILE%\Downloads\The Legend of Zelda Ocarina of Time Switch 2 NUP Base Game\The Legend of Zelda Ocarina of Time Switch 2 NUP Base Game\v3.0.0-rc.3\romfs. With the opening's voice file, that comes to 244 characters plus the user name, which is past 240 for any user name. I've said so on the issue.

@Beanstalk please test on Windows, NVIDIA or AMD, with this PR's build against main. Put the game in a deep folder, so its romfs path is about 160 characters or more (e.g. a nested ...\Downloads\<long name>\<long name>\ folder). Use Japanese voices and HOS_FS_TRACE=1, start a new game, and let the opening play up to the Twinrova intro cutscene, or to Nabooru's first voiced line if that is quicker. Expected on main: fs: OpenFile(content://Voice/Resource//Stream/...): not found and no voices. Expected with this PR: those files open and the lines are heard. Please also say whether the voices can be heard at all.

I reviewed this against current `main` for the v3.0.0 release (an agent working for HumanBean). I read the code only and pushed nothing. **No checks were run on this PC.** Forgejo's CI runs them, but its jobs on c3682569 are still waiting on "Blocked by required conditions": a fork's runs need a maintainer to approve them. `tests/test_fs_path_utf8.py` is Windows-only either way. **The fix is right for #1298.** - `host_path` leaves the game's `Voice/Resource//Stream/...` as it is. `guest_path_ok` skips a run of `/`, so it lets the doubled separator through. - `fs_wide` then prefixes `\\?\` from 240 characters, and Windows doesn't tidy anything under that prefix. - The new pass only runs on paths that got the prefix. It writes in place behind the read pointer and starts after the prefix, so `\\?\UNC\server` keeps its first `\`. It turns a `/` into a `\` and a run of separators into one. - Short paths and paths that already have `\\?\` are as before. **What it doesn't normalise:** `.` and `..` segments, and a trailing dot or space on a segment. A short path gets these tidied by Windows; under the prefix they are taken literally. The game's own paths can't contain them, because `guest_path_ok` refuses them. The root folders come from the exe's folder (`beside_romfs`) or `%APPDATA%`, and those have none. So only a hand-typed `--romfs`/`--user` like `C:\a\..\b` that is also long would hit it. I don't think that should hold this PR before the release. A follow-up could normalise the whole path with `GetFullPathNameW` before adding the prefix, which is what `os.path.abspath` already does for `nup.py`/`make_game.py`'s `long_path`. I didn't add it here because it would make the in-game run stale. **Other places that build `\\?\` paths:** - `nx2/nup.py` and `nx2/make_game.py` `long_path` call `abspath` first (`GetFullPathNameW`), so their paths are normalised. - `hos_crash_dialog.c` and `vk_bug_report.cpp` only remove the prefix. - `hos_fs_host_path` has no callers. - `tests/test_utf8_paths.py` doesn't read `nn_fs.c`. Nothing else needs this change. **Branch:** `host/nn_fs.c` and `tests/test_fs_path_utf8.py` haven't changed on `main` since the merge base 544229a2, and the PR merges as it is. I don't think it needs a rebase. **A side finding, not for this PR:** `mods.c` `lower_slash` keys `voice/resource//stream/...` with the doubled `/`, so a mod's replacement voice file probably never matches, on any OS. It's worth an issue of its own. **#982 is very likely the same bug.** That log mounts `content:` at `%USERPROFILE%\Downloads\The Legend of Zelda Ocarina of Time Switch 2 NUP Base Game\The Legend of Zelda Ocarina of Time Switch 2 NUP Base Game\v3.0.0-rc.3\romfs`. With the opening's voice file, that comes to 244 characters plus the user name, which is past 240 for any user name. I've said so on the issue. @Beanstalk please test on Windows, NVIDIA or AMD, with this PR's build against `main`. Put the game in a deep folder, so its `romfs` path is about 160 characters or more (e.g. a nested `...\Downloads\<long name>\<long name>\` folder). Use Japanese voices and `HOS_FS_TRACE=1`, start a new game, and let the opening play up to the Twinrova intro cutscene, or to Nabooru's first voiced line if that is quicker. Expected on main: `fs: OpenFile(content://Voice/Resource//Stream/...): not found` and no voices. Expected with this PR: those files open and the lines are heard. Please also say whether the voices can be heard at all.
Member

Beanstalk test farm

Commit c368256 · tier reviewed · approved by HumanBean · dashboard

What will be tested · AI plan (gpt-6.1-terra)

This Windows smoke test compares main and the PR in Kokiri Forest and after loading the Spirit Temple, taking about 13 minutes per tester. It checks for crashes, load-time regressions, and visible differences. The farm cannot place romfs in a specified deep folder, select Japanese voices, enable the requested filesystem trace, or listen to audio, so it cannot verify the reported voice fix or say whether voices are audible.

  • Where: windows (1-2 reports).
  • forest-and-spirit-temple: from a new save, then take the picture forest to compare with main, switch to adult Link, teleport to Spirit Temple, take the picture spirit-temple to compare with main, measure temple for 10 s (after 5 s warm-up); 1 run on each side.
  • Measured: crashes, load times.
  • The PR fails if: it crashes; or a picture differs from main by more than 5%; or longest load is more than 30% above main.
  • Time: about 13 min of game runs per tester (2 game starts), plus the two builds.

Done (started 18:19 UTC). Comment @Beanstalk to run it again.

Target Reports Crash Frame p99 (ms) vs main VRAM peak (MB) vs main Result
windows 0/1 — — — queued
<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `c368256` · tier **reviewed** · approved by HumanBean · [dashboard](https://beanstalk.magicbean.dev/prs/1346) **What will be tested** · AI plan (`gpt-6.1-terra`) This Windows smoke test compares main and the PR in Kokiri Forest and after loading the Spirit Temple, taking about 13 minutes per tester. It checks for crashes, load-time regressions, and visible differences. The farm cannot place romfs in a specified deep folder, select Japanese voices, enable the requested filesystem trace, or listen to audio, so it cannot verify the reported voice fix or say whether voices are audible. - **Where:** windows (1-2 reports). - **forest-and-spirit-temple:** from a new save, then take the picture forest to compare with main, switch to adult Link, teleport to Spirit Temple, take the picture spirit-temple to compare with main, measure temple for 10 s (after 5 s warm-up); 1 run on each side. - **Measured:** crashes, load times. - **The PR fails if:** it crashes; or a picture differs from main by more than 5%; or longest load is more than 30% above main. - **Time:** about 13 min of game runs per tester (2 game starts), plus the two builds. Done (started 18:19 UTC). Comment `@Beanstalk` to run it again. | Target | Reports | Crash | Frame p99 (ms) vs main | VRAM peak (MB) vs main | Result | | --- | --- | --- | --- | --- | --- | | windows | 0/1 | — | — | — | queued |
HumanBean deleted branch fix/long-path-doubled-separator 2026-11-17 18:21:26 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/windows 0/1 pass, 0 running, 0 queued
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 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/Longshot!1346
No description provided.