Commit a748f685 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

setupapi: Clear the Win32 error if no copy was necessary.

parent d5f6d641
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment