startup: show live_view file opens under the run's package root #1273
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1280"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T06:34:32Z.
Change
tools/startup/live_view.pyshowed game-file opens only forG:\and for one hard-coded local package folder. That folder name was the title's name, which goes against the title-neutral wording rule inCONTRIBUTING.md. It also missed opens from any other-DataDir.debug_launch.pynow passes the run's working directory, the package root fromrun.ps1 -DataDir, to the viewer as a second argument.live_view.pybuilds the file-open pattern fromG:\and that root. The root is escaped and has a trailing separator, so a sibling folder such asD:\PkgOtherdoes not matchD:\Pkg. The root is matched without regard to case.G:\is shown.Nothing else in the viewer, the launcher or the logs changes.
Verification
Commit: this branch on
05ed719f, Windows 11 26H2 build 26300.9974, Python 3.13.1.A synthetic run directory with seven
files.txtlines (G:\, the root, the root in lower case, a sibling folder, the old hard-coded folder,C:\Windows, and anNtQueryAttributesFileline) plus afinished.txt, so the viewer exits on its own. Thefilelines it printed:mainG:\a.rpf, old hard-coded folderG:\a.rpfD:\PkgorD:\Pkg\G:\a.rpf,D:\Pkg\b.rpf (failed 0xc0000034),d:\pkg\d.binmainG:\G:\a.rpfThe sibling folder,
C:\WindowsandNtQueryAttributesFilelines are never shown. As a negative control, a mutant that drops the trailing separator from the root also shows the sibling folder,D:\PkgOther\e.rpf.python -W errorcompile of both changed files: OK.python -B tests/docs_links_check.py: 16 files, 285 links OK.python -B tests/bidi_controls_check.py: OK.I did not run a full startup run, because that needs local title files. No test is registered for the viewer, and the synthetic check above is the only coverage.
Checklist
docs/startup-runtime.mddoes not document the viewer's arguments.)AI-assisted.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T06:58:52Z.
I added a follow-up for filenames containing spaces. In a synthetic completed run, the viewer printed the full filename under a package root with spaces, kept a failing G: open with its original status, and ignored the sibling package directory. The new head is
8bacaa17.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T07:06:52Z.
Review: COMMENTED
Dual-platform review at commit
8bacaa175017745d7623d6b67278be2b52aa8a06:Linux checks
git diff --check origin/main...HEAD: passedpython -B tests/docs_links_check.py: passed (16 Markdown files, 285 links)python -B tests/bidi_controls_check.py: passed (1072 tracked files)python -B -m py_compile tools/startup/debug_launch.py tools/startup/live_view.py: passedgame_filepattern: verified case-insensitive matching with spaces under bothG:\and a package root, and non-matching for unrelated paths.Windows Server 2025
tools/startup/live_view.pyreadssys.argv[1]at module top level without a standalone self-test, so no Win2025 C++/CTest build was needed.Notes & Edge Cases
cwdpassed fromtools/startup/debug_launch.pyand matching up to(?= from (?:[^+]*\+)?0x[0-9a-fA-F]+ )cleanly handles package roots and paths containing spaces.sys.argv[2]guard: intools/startup/live_view.py,if len(sys.argv) > 2will callos.path.abspath("")if an empty string is passed, which resolves to the viewer's own working directory. Guardinglen(sys.argv) > 2 and sys.argv[2](andcwdindebug_launch.py) avoids unintentionally matching the viewer's CWD.