Commit 23473ccc authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

wininet/ftp: Let CreateFile deal with last error.

parent 24eabb8a
...@@ -284,10 +284,8 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile, ...@@ -284,10 +284,8 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
/* Open file to be uploaded */ /* Open file to be uploaded */
if (INVALID_HANDLE_VALUE == if (INVALID_HANDLE_VALUE ==
(hFile = CreateFileW(lpszLocalFile, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0))) (hFile = CreateFileW(lpszLocalFile, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0)))
{ /* Let CreateFile set the appropriate error */
INTERNET_SetLastError(ERROR_FILE_NOT_FOUND);
return FALSE; return FALSE;
}
hIC = lpwfs->lpAppInfo; hIC = lpwfs->lpAppInfo;
......
...@@ -616,6 +616,9 @@ static void test_putfile(void) ...@@ -616,6 +616,9 @@ static void test_putfile(void)
return; return;
} }
/* Start clean */
DeleteFileA("non_existing_local");
/* We should have a ftp-connection, try some puts */ /* We should have a ftp-connection, try some puts */
/* No local file given */ /* No local file given */
......
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