Hi, Piotr.
On 15/6/30 下午8:25, Piotr Caban wrote:
Currently your implementation sometimes
returns error even so it
succeeds.
Which one do you mean ? As you know, last_error hadling is not
correct
in wine's CopyFile, was this happened in Wine platform?
{ "f1", "tr2_test_dir\\f1_copy", TRUE }
Your implementation returns error if f1_copy file already exists.
It only makes sense to use GetLastError if function have failed.
I had tested the ret and the last_error before in testbot. The
result shows that the function's return value is exactly the same as
GetLastError().
ret = p_tr2_sys__Copy_file(tests[i].source, tests[i].dest,
tests[i].fail_if_exists);
printf("ret is %d\n", ret);
printf("GetLastError is %d\n\n", GetLastError());
Here is the test result:
https://testbot.winehq.org/JobDetails.pl?Key=14885&log_101=1#k101
And { "f1", "tr2_test_dir\\f1_copy", TRUE } returns 80(
ERROR_FILE_EXSITS).