diff options
| author | Tyrannys <80750971+Tyrannys@users.noreply.github.com> | 2026-11-27 19:08:34 -0600 |
|---|---|---|
| committer | Tyrannys <80750971+Tyrannys@users.noreply.github.com> | 2026-11-27 19:08:34 -0600 |
| commit | 03d17a395ea8b6b7f21032ea2d1d6eac74ccd48d (patch) | |
| tree | ff852caa6b75ebcc4f4d0845a7a0a07187c19ce8 /runtime/test/queue_proxy_test.cpp | |
| parent | 431ceba4f4a55c69c26fcf0e36fd83e86e1b9a32 (diff) | |
xgameruntime_gamesave: copy blobs with CopyFileW, not CopyFile2
copy_blob() backs up a blob before a commit overwrites it and copies it
back when an update is rolled back. It used std::filesystem::copy_file,
which in MSVC calls CopyFile2. Wine 9 and the Protons built on it do not
implement CopyFile2, and the call aborts the process (kevincommits'
finding in #1608, batch 18 item 1). file_system.cpp already avoids it
for the same reason.
copy_blob() now calls CopyFileW(from, to, FALSE). On Windows it copies
the same way: contents, attributes and last-write time, replacing an
existing file.
xgameruntime_gamesave_test gains a case that patches this process's
CopyFile2 to fail and count calls, as Wine's stub would, then runs an
update that overwrites a blob and one that is rolled back. Its 3 checks
fail with main's copy_blob and pass with the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/queue_proxy_test.cpp')
0 files changed, 0 insertions, 0 deletions