wininet/ftp: Let CreateFile deal with last error.
This commit is contained in:
parent
24eabb8a46
commit
23473ccc9e
|
@ -284,10 +284,8 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
|
|||
/* Open file to be uploaded */
|
||||
if (INVALID_HANDLE_VALUE ==
|
||||
(hFile = CreateFileW(lpszLocalFile, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0)))
|
||||
{
|
||||
INTERNET_SetLastError(ERROR_FILE_NOT_FOUND);
|
||||
/* Let CreateFile set the appropriate error */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hIC = lpwfs->lpAppInfo;
|
||||
|
||||
|
|
|
@ -616,6 +616,9 @@ static void test_putfile(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Start clean */
|
||||
DeleteFileA("non_existing_local");
|
||||
|
||||
/* We should have a ftp-connection, try some puts */
|
||||
|
||||
/* No local file given */
|
||||
|
|
Loading…
Reference in New Issue