Commit b311cca5 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wininet: Delete local file on error in FtpGetFile.

parent a5c64551
...@@ -1552,6 +1552,7 @@ static BOOL FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, ...@@ -1552,6 +1552,7 @@ static BOOL FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile,
&iar, sizeof(INTERNET_ASYNC_RESULT)); &iar, sizeof(INTERNET_ASYNC_RESULT));
} }
if (!bSuccess) DeleteFileW(lpszNewFile);
return bSuccess; return bSuccess;
} }
......
...@@ -259,7 +259,6 @@ static void test_getfile(HINTERNET hFtp, HINTERNET hConnect) ...@@ -259,7 +259,6 @@ static void test_getfile(HINTERNET hFtp, HINTERNET hConnect)
ok ( GetLastError() == ERROR_INTERNET_EXTENDED_ERROR, ok ( GetLastError() == ERROR_INTERNET_EXTENDED_ERROR,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d\n", GetLastError()); "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 */ /* 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, ok (GetFileAttributesA("should_also_be_non_existing_deadbeef") == INVALID_FILE_ATTRIBUTES,
"Local file should not have been created\n"); "Local file should not have been created\n");
...@@ -280,7 +279,6 @@ static void test_getfile(HINTERNET hFtp, HINTERNET hConnect) ...@@ -280,7 +279,6 @@ static void test_getfile(HINTERNET hFtp, HINTERNET hConnect)
ok ( GetLastError() == ERROR_INTERNET_EXTENDED_ERROR, ok ( GetLastError() == ERROR_INTERNET_EXTENDED_ERROR,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d\n", GetLastError()); "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 */ /* 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, ok (GetFileAttributesA("should_also_be_non_existing_deadbeef") == INVALID_FILE_ATTRIBUTES,
"Local file should not have been created\n"); "Local file should not have been created\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment