wininet: Delete local file on error in FtpGetFile.

This commit is contained in:
Hans Leidekker 2008-07-19 19:53:19 +02:00 committed by Alexandre Julliard
parent a5c6455193
commit b311cca552
2 changed files with 1 additions and 2 deletions

View File

@ -1552,6 +1552,7 @@ static BOOL FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile,
&iar, sizeof(INTERNET_ASYNC_RESULT));
}
if (!bSuccess) DeleteFileW(lpszNewFile);
return bSuccess;
}

View File

@ -259,7 +259,6 @@ static void test_getfile(HINTERNET hFtp, HINTERNET hConnect)
ok ( GetLastError() == ERROR_INTERNET_EXTENDED_ERROR,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d\n", GetLastError());
/* Currently Wine always creates the local file (even on failure) which is not correct, hence the test */
todo_wine
ok (GetFileAttributesA("should_also_be_non_existing_deadbeef") == INVALID_FILE_ATTRIBUTES,
"Local file should not have been created\n");
@ -280,7 +279,6 @@ static void test_getfile(HINTERNET hFtp, HINTERNET hConnect)
ok ( GetLastError() == ERROR_INTERNET_EXTENDED_ERROR,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d\n", GetLastError());
/* Currently Wine always creates the local file (even on failure) which is not correct, hence the test */
todo_wine
ok (GetFileAttributesA("should_also_be_non_existing_deadbeef") == INVALID_FILE_ATTRIBUTES,
"Local file should not have been created\n");