setupapi: Clear the Win32 error if no copy was necessary.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d5f6d6419b
commit
a748f685a5
|
@ -1145,6 +1145,8 @@ static BOOL do_file_copyW( LPCWSTR source, LPCWSTR target, DWORD style,
|
|||
rc = CopyFileW(source,target,FALSE);
|
||||
TRACE("Did copy... rc was %i\n",rc);
|
||||
}
|
||||
else
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
|
||||
/* after copy processing */
|
||||
if (style & SP_COPY_DELETESOURCE)
|
||||
|
|
|
@ -1369,7 +1369,7 @@ static void test_install_file(void)
|
|||
SetLastError(0xdeadbeef);
|
||||
ret = SetupInstallFileA(hinf, &infctx, "one.txt", "src", "one.txt", SP_COPY_REPLACEONLY, NULL, NULL);
|
||||
ok(!ret, "Expected failure.\n");
|
||||
todo_wine ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#x.\n", GetLastError());
|
||||
ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#x.\n", GetLastError());
|
||||
ok(!file_exists("dst/one.txt"), "Destination file should not exist.\n");
|
||||
|
||||
ret = SetupFindFirstLineA(hinf, "section1", "two.txt", &infctx);
|
||||
|
|
Loading…
Reference in New Issue