12 Feb
2024
12 Feb
'24
6:25 p.m.
Zebediah Figura (@zfigura) commented about dlls/kernelbase/file.c:
return ret; }
+/*********************************************************************** + * CopyFile2 (kernelbase.@) + */ +HRESULT WINAPI CopyFile2( PCWSTR source, PCWSTR dest, COPYFILE2_EXTENDED_PARAMETERS *params ) { + DWORD prev_err = GetLastError(); + HRESULT res; + + res = CopyFile2_impl(source, dest, params) ? S_OK : HRESULT_FROM_WIN32(GetLastError()); + + SetLastError(prev_err); + return res;
Perhaps better would just be to return the error directly from the helper. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5020#note_60902