diff options
| author | Claude <noreply@anthropic.com> | 2026-11-22 20:55:57 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-11-22 20:55:57 +0000 |
| commit | 49ea89f201e457ad010c84d1af6baa928a8a1a67 (patch) | |
| tree | 03762d57c4d411a826eb585079a78a230501a59e /runtime/src | |
| parent | f847748cc76bd3777f9c070c4034eb2fc1c04e64 (diff) | |
file_system: CopyFile2 falls back to CopyFileExW where the host has none
The shim's CopyFile2 called ::CopyFile2 directly. Wine 9's kernel32 and
kernelbase don't export it, so Wine binds that import to a stub that
aborts the process: under Wine 9 (or a Proton built on it), a title that
calls CopyFile2 is killed. The file_system test shows it: it aborts at
its CopyFile2 check and runs into ctest's timeout.
The host's CopyFile2 is now looked up with GetProcAddress (kernelbase,
then kernel32) and used where it exists, so Windows behaves as before.
Where it doesn't, the copy goes through CopyFileExW: the flags both calls
define and the cancel flag are passed on, the CopyFile2-only hints are
dropped, and a COPYFILE2 progress routine is not called. pe_loader.cpp
and loader_tls_test.cpp already avoid CopyFile2 for the same reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GN11jcpJWD4phrXJyDgED6
Diffstat (limited to 'runtime/src')
0 files changed, 0 insertions, 0 deletions