6 Nov
2025
6 Nov
'25
3:34 p.m.
On Thu Nov 6 08:25:45 2025 +0000, eric pouech wrote:
perhaps a simple approach would be to detect if same file in the case of CopyFileW fails this would: * avoid adding extra variables that complexify the whole code flow, and add states that should be handled in various places... * avoid checking for the same file in successful copies (and spend unneeded time in it) CopyFileW returns ERROR_SHARING_VIOLATION in the case where a file is attempted to copy onto itself. How to differentiate between this and copying onto a different file that may be open by another process? That is the purpose of the IsSameFile function.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9112#note_121035