mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
MoveFile returns ERROR_ALREADY_EXISTS, not ERROR_FILE_EXISTS.
This commit is contained in:
parent
cf50f9a04e
commit
513670551b
@ -669,7 +669,7 @@ static void test_MoveFileA(void)
|
||||
ok(ret != 0, "GetTempFileNameA error %ld", GetLastError());
|
||||
|
||||
ret = MoveFileA(source, dest);
|
||||
ok(!ret && GetLastError() == ERROR_FILE_EXISTS,
|
||||
ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS,
|
||||
"MoveFileA: unexpected error %ld\n", GetLastError());
|
||||
|
||||
ret = DeleteFileA(dest);
|
||||
@ -745,7 +745,7 @@ static void test_MoveFileW(void)
|
||||
ok(ret != 0, "GetTempFileNameW error %ld", GetLastError());
|
||||
|
||||
ret = MoveFileW(source, dest);
|
||||
ok(!ret && GetLastError() == ERROR_FILE_EXISTS,
|
||||
ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS,
|
||||
"CopyFileW: unexpected error %ld\n", GetLastError());
|
||||
|
||||
ret = DeleteFileW(source);
|
||||
|
@ -1817,7 +1817,7 @@ BOOL WINAPI MoveFileExW( LPCWSTR fn1, LPCWSTR fn2, DWORD flag )
|
||||
/* target exists, check if we may overwrite */
|
||||
if (!(flag & MOVEFILE_REPLACE_EXISTING))
|
||||
{
|
||||
SetLastError( ERROR_FILE_EXISTS );
|
||||
SetLastError( ERROR_ALREADY_EXISTS );
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user