Robert Shearman <[EMAIL PROTECTED]> writes:

> +    /*
> +     * Open the replacement file for reading, writing, and deleting
> +     * (writing and deleting are needed when finished)
> +     */
> +    if ((hReplacement = CreateFileW(lpReplacementFileName,
> +        GENERIC_READ | GENERIC_WRITE,
> +        FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
> +        NULL, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE)
> +    {
> +        error = GetLastError(); /* Use error returned by CreateFileW */
> +        goto fail;
> +    }

Files should be opened with NtOpenFile the same way MoveFile does, to
avoid having to convert path names twice.

-- 
Alexandre Julliard
[EMAIL PROTECTED]


Reply via email to