Run: a folder given as the executable is said so; README clones this repository (#395) #398
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!398
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-398"
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?
@hussainmussa on GitHub · 2026-11-26 23:47 UTC · original
hussainmussa:fix/exe-is-a-folder→a-publier· +9 −2 · 3 files · 1 commits · openFixes #395.
What was wrong
Two separate things in that report.
The error.
victory runandscripts\play.ps1take a folder for the title's executable and fail withThat is how Windows answers reading a folder as a file, and it reads as a permissions problem.
play.ps1only checked that the path exists, which a folder does, andrun.rswent straight tostd::fs::read.The README. The clone command under "How to run it" named another fork (
avatarmanz/VIctory-7900XTX), so someone following it builds that fork, not this one.What this does
victory run: a folder is refused at once with<path> is a folder: give the path of the title's executable inside it.scripts\play.ps1: the same check beside the existing "No ." one, so the launcher says it before anything starts.README.md: the clone command and thecdafter it name this repository.Testing
Windows 11, Rust 1.98.1.
victory run <a folder>gives exactly the reported text:reading <folder>/Access is denied. (os error 5).<folder> is a folder: give the path of the title's executable inside it.scripts\play.ps1 -Exe <a folder>: prints the new line and exits 1.-Exe <a path that does not exist>: stillNo <path>., exit 1.cargo clippy -p victory --no-deps --all-targets --locked -- -D warnings: clean.Not tested: a run with a real executable (I have no game files). The check only refuses folders, so a file takes the same path as before.
I am assuming the reporter's path was a folder: it has no extension and the error matches to the letter, but only they can confirm it.
Written with help from Claude; everything above was built and run on my machine.
@lvndrpup on GitHub · 2026-11-27 04:41 UTC · original · reviewed
Checked on Windows 11 build 26300, Rust 1.98.1, debug, with
victorybuilt at4eb6cfdand at2d59084. No game files, so the "file" cases use a small non-PE file. Forplay.ps1I ran each version of the script against a stubvictory.exethat prints its arguments and exits.4eb6cfdvictory run "<folder with a space>"(with and without--execute)Error: reading <folder>/Access is denied. (os error 5), exit 1Error: <folder> is a folder: give the path of the title's executable inside it, exit 1victory run <missing>.exeThe system cannot find the file specified. (os error 2), exit 1victory run <non-PE file>malformed image: Could not read file magic, exit 1play.ps1 -Exe <folder>victory run --execute<folder> is a folder. Give the path of the executable inside it., exit 1,victorynot startedplay.ps1 -Exe <missing>No <path>., exit 1cargo clippy -p victory --no-deps --all-targets -- -D warnings, with and without--all-featurescargo test -p xtaskOverlaps, none of them blocking: #458 makes the same README clone fix (identical lines, so
git mergeof the two is clean), and #459 also editsscripts/play.ps1a few lines lower (also merges clean with this one).@gut0to on GitHub · 2026-11-27 15:16 UTC · original · reviewed
AI-assisted static review; I checked the PowerShell path validation added here. I did not run the script.
@ -34,6 +34,7 @@ foreach ($k in $More.Keys) { $settings[$k] = $More[$k] }$victory = Join-Path $PSScriptRoot "..\target\$Build\victory.exe"if (-not (Test-Path $victory)) { Write-Host "No $victory. Build it first (README.md)."; exit 1 }if (-not (Test-Path $Exe)) { Write-Host "No $Exe."; exit 1 }if (Test-Path $Exe -PathType Container) { Write-Host "$Exe is a folder. Give the path of the executable inside it."; exit 1 }@gut0to on GitHub · 2026-11-27 15:16 UTC · original
AI-assisted review:
$Exeis a user-supplied literal path, butTest-Pathtreats square brackets as wildcard syntax. A valid install path with a[Steam]directory can therefore make this new folder check inspect a pattern instead of the requested path. Could this use-LiteralPath(and update the existence check immediately above too) so the diagnostic works for bracketed paths?View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.