PLAY_FRAMEGEN: an absent drive or an empty game_dir.txt no longer stops the launcher #3795

Open
github-bot wants to merge 1 commit from github-bot/gh-3795 into main AGit
Owner

@⁠mixaoc on GitHub · 2026-11-30 07:20 UTC · original
mixaoc:patch-3 → main · +3 −1 · 1 files · 1 commits · open

What it changes

Two cases stopped scripts/play-gta6-framegen.ps1 before it could search the drives for the game:

  • game_dir.txt (or -GameDir) names a drive that is not there: Join-Path throws "Cannot find drive".
  • game_dir.txt is empty (0 bytes): .Trim() is called on $null.

Test-GameDir now asks whether the folder exists before joining a path to it, and the line read is made a string before it is trimmed.

How it was tested

  • Windows PowerShell 5.1. The script's parameters, Test-GameDir, Find-GameDir and the call to it, run with a temporary repository folder.
  • Before: empty file, absent drive in the file, drive letter alone, and -GameDir on an absent drive all throw.
  • After: the first three go on to the drive search; -GameDir on an absent drive is reported as not a game folder.
  • A valid folder is still accepted with [ ] in its name, a trailing backslash, quotes, or surrounding spaces.
  • Not covered: a path with characters such as < > | still throws, as before.
  • Not tested: a full launch with the game, PowerShell 7.
  • cargo test: no crate touched (script only).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2783 (adds lines just after the changed line in Find-GameDir), #2694, #2868.
**@⁠mixaoc** on GitHub · 2026-11-30 07:20 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3795) `mixaoc:patch-3` → `main` · +3 −1 · 1 files · 1 commits · open ## What it changes Two cases stopped `scripts/play-gta6-framegen.ps1` before it could search the drives for the game: - `game_dir.txt` (or `-GameDir`) names a drive that is not there: `Join-Path` throws "Cannot find drive". - `game_dir.txt` is empty (0 bytes): `.Trim()` is called on `$null`. `Test-GameDir` now asks whether the folder exists before joining a path to it, and the line read is made a string before it is trimmed. ## How it was tested - Windows PowerShell 5.1. The script's parameters, `Test-GameDir`, `Find-GameDir` and the call to it, run with a temporary repository folder. - Before: empty file, absent drive in the file, drive letter alone, and `-GameDir` on an absent drive all throw. - After: the first three go on to the drive search; `-GameDir` on an absent drive is reported as not a game folder. - A valid folder is still accepted with `[ ]` in its name, a trailing backslash, quotes, or surrounding spaces. - Not covered: a path with characters such as `< > |` still throws, as before. - Not tested: a full launch with the game, PowerShell 7. - `cargo test`: no crate touched (script only). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2783 (adds lines just after the changed line in `Find-GameDir`), #2694, #2868.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 07:23:42 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3795/head:github-bot/gh-3795'
git switch 'github-bot/gh-3795'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3795'
git switch 'github-bot/gh-3795'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3795'
git switch 'github-bot/gh-3795'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3795'
git switch 'main'
git merge --squash 'github-bot/gh-3795'
git switch 'main'
git merge --ff-only 'github-bot/gh-3795'
git switch 'main'
git merge 'github-bot/gh-3795'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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
github/trustno1-coder--VIctory-NVIDIA!3795
No description provided.