Re: [PATCH 2/3]: msvcp110: Add tr2_sys__Rename implementation and test.(try 3)
On 07/05/15 20:49, YongHao Hu wrote:
+ if(!strcmp(old_path, new_path) || MoveFileExA(old_path, new_path, MOVEFILE_COPY_ALLOWED)) The comparison of paths doesn't look right. Why have you added it?
Cheers, Piotr
Hi, On 15/7/6 下午4:46, Piotr Caban wrote:
On 07/05/15 20:49, YongHao Hu wrote:
+ if(!strcmp(old_path, new_path) || MoveFileExA(old_path, new_path, MOVEFILE_COPY_ALLOWED)) The comparison of paths doesn't look right. Why have you added it?
The test { "tr2_test_dir\\f1", "tr2_test_dir\\f1", ERROR_SUCCESS } in wine's CopyFileA function set LastError as ERROR_ALREADY_EXISTS, so I just simply handled it by comparison of paths. Your comment is true and the implementation was wrong. In fact, CopyFIleA doesn't change Last_error in this case. Thus, we don't need the comparison of paths here. Ps: I think I will add to_do tests of these functions. : P Thank you.
Cheers, Piotr
participants (2)
-
Piotr Caban -
YongHao Hu