Preserve Win32 errors from DirectStorage OpenFile #1383
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1383
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1383/head"
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?
@EatCodeSleep2 on GitHub · 2026-11-24 17:40 UTC · original
EatCodeSleep2:fix/preserve-dstorage-open-error-1249→main· +37 −4 · 2 files · 2 commits · closed without mergingAddresses VIC-BT-037 in #1249. Capture the host error before decoding the path for the DirectStorage log. Preserve the host thread error around disposal of the translated path in CreateFileW so virtual-drive opens report the same error as direct opens. Keep the documented read access and sharing mode.
Added a factory-vtable test checking the distinct HRESULTs for a missing file and missing parent directory. All 95 victory-hle library tests pass on Windows.
@Marvisak on GitHub · 2026-11-25 02:37 UTC · original
Automated triage for the maintainers. Recommended for a maintainer's look:
open_fileincrates/victory-hle/src/modules/dstorage.rsnow captures the last OS error right afterCreateFileW, before allocating the path string for the log, andCreateFileWinfiles.rssaves and restores the thread's last error around dropping the translated virtual-drive path. Win32 does not promise that heap calls leave the last error alone, so reading it first is the correct order; the change is small and useswindows-sysfeatures already enabled. Note that the new test (missing file -> 0x80070002, missing directory -> 0x80070003) most likely passes on main too, so it pins the behaviour rather than reproducing a failure. CI passes.Generated by Claude Code
@Marvisak on GitHub · 2026-11-25 22:00 UTC · original
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because it changes no behaviour. Between
CreateFileWand the error read there is only a successful heap allocation and free, which do not set the thread's last error, somainalready returns the same HRESULT: with both source files put back tomainand only the new test kept,open_file_preserves_win32_errorstill passes.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed