launcher(pagefile): support REG_SZ and REG_EXPAND_SZ PagingFiles values #46
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/46"
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 ReTerryDavis/ReVIctory. Originally posted by Geekmemz on 2026-12-04T15:56:36Z.
Summary
Windows can store
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFilesasREG_SZ(orREG_EXPAND_SZ) instead ofREG_MULTI_SZ. Previouslyread_paging_files_registry()rejected non-REG_MULTI_SZvalues and returned an empty list, causingconfigured_text()to report"Disabled / custom"for system-managed pagefiles and preventingPendingRebootdetection for configured single-string pagefiles.Changes
decode_paging_files_value(kind, raw)inapps/victory/src/launcher/pagefile.rsto decode UTF-16LE bytes forREG_MULTI_SZ,REG_SZ, andREG_EXPAND_SZ(stopping at the first NUL for single-string types, handling missing trailing NULs and odd byte lengths cleanly, and returning empty for non-string types).read_paging_files_registry()to acceptREG_MULTI_SZ,REG_SZ, andREG_EXPAND_SZand read raw bytes before decoding.launcher::pagefile::testscoveringREG_MULTI_SZ,REG_SZ(with/without trailing NUL, trailing data after first NUL),REG_EXPAND_SZ, odd byte length, and non-stringREG_DWORD.Verification
Ran locally on Windows 11 (
x86_64-pc-windows-msvc, Rust1.98.1):cargo clippy -p victory --all-targets --locked -- -D warnings— passed (0 warnings)cargo clippy -p victory --all-targets --all-features --locked -- -D warnings— passed (0 warnings)cargo test -p victory --locked launcher::pagefile— 6 passed, 0 failedcargo test -p xtask --locked— 9 passed, 0 failed (asset policy: 407 files ok)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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.