Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
02faaea9
Commit
02faaea9
authored
Apr 11, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Reset last error on success in CopyFileExW().
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d72d5960
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
file.c
dlls/kernel32/tests/file.c
+7
-0
file.c
dlls/kernelbase/file.c
+1
-0
msvcp140.c
dlls/msvcp140/tests/msvcp140.c
+1
-1
No files found.
dlls/kernel32/tests/file.c
View file @
02faaea9
...
...
@@ -899,8 +899,15 @@ static void test_CopyFileW(void)
ok
(
!
ret
&&
GetLastError
()
==
ERROR_FILE_EXISTS
,
"CopyFileW: unexpected error %ld
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CopyFileW
(
source
,
dest
,
FALSE
);
ok
(
ret
,
"CopyFileW: error %ld
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Unexpected error %lu.
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CopyFileExW
(
source
,
dest
,
NULL
,
NULL
,
NULL
,
0
);
ok
(
ret
,
"CopyFileExW: error %ld
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Unexpected error %lu.
\n
"
,
GetLastError
());
ret
=
DeleteFileW
(
source
);
ok
(
ret
,
"DeleteFileW: error %ld
\n
"
,
GetLastError
());
...
...
dlls/kernelbase/file.c
View file @
02faaea9
...
...
@@ -588,6 +588,7 @@ done:
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
CloseHandle
(
h1
);
CloseHandle
(
h2
);
if
(
ret
)
SetLastError
(
0
);
return
ret
;
}
...
...
dlls/msvcp140/tests/msvcp140.c
View file @
02faaea9
...
...
@@ -1619,7 +1619,7 @@ static void test_Copy_file(void)
SetLastError
(
0xdeadbeef
);
ret
=
p_Copy_file
(
L"wine_test_dir/f1"
,
L"wine_test_dir/f3"
);
ok
(
ret
==
ERROR_SUCCESS
,
"Got unexpected ret %lu.
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ret
,
"Got unexpected err %lu.
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ret
,
"Got unexpected err %lu.
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
p_Copy_file
(
L"wine_test_dir/missing"
,
L"wine_test_dir/f3"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment