[PATCH] MSI: Shedule rename operation also for ERROR_USER_MAPPED_FILE.

Hans Leidekker hans at codeweavers.com
Sat Oct 31 05:04:31 CDT 2009


On Saturday 31 October 2009 05:22:31 you wrote:

> I haven't came across an installer yet that fails on WINE because of this.
> I have jumped ahead a bit here.
> 
> Regardless, if a file has been mapped by using CreateFileMapping/MapViewOfFile
> and the CopyFile api (having the last parameter as FALSE) is used in an attempt
> to overwrite it, CopyFile will of course fail.
> In Windows, XP and 2k at least, GetLastError in this case will return
> ERROR_USER_MAPPED_FILE. Currently WINE does not return this error code, actually
> it returns ERROR_ALREADY_EXISTS which is incorrect. So that would have to be
> fixed in WINE to see the problem in an msi installer.
> 
> Im assuming Im gonna have to create a test for for kernel32/file.c showing the
> wrong error set for CopyFile failing in that case before this patch can be accepted?

It would need a fix as well. There's no point in checking for this error if
Wine doesn't return it.

 -Hans



More information about the wine-devel mailing list