Commit 9a7fb5f1 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

wininet/ftp: Simplify FTP_FtpGetFileW a bit.

parent 5b5d7371
...@@ -1317,7 +1317,7 @@ BOOL WINAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, ...@@ -1317,7 +1317,7 @@ BOOL WINAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile,
hFile = CreateFileW(lpszNewFile, GENERIC_WRITE, 0, 0, fFailIfExists ? hFile = CreateFileW(lpszNewFile, GENERIC_WRITE, 0, 0, fFailIfExists ?
CREATE_NEW : CREATE_ALWAYS, dwLocalFlagsAttribute, 0); CREATE_NEW : CREATE_ALWAYS, dwLocalFlagsAttribute, 0);
if (INVALID_HANDLE_VALUE == hFile) if (INVALID_HANDLE_VALUE == hFile)
goto lend; return FALSE;
/* Set up socket to retrieve data */ /* Set up socket to retrieve data */
nBytes = FTP_SendRetrieve(lpwfs, lpszRemoteFile, dwInternetFlags); nBytes = FTP_SendRetrieve(lpwfs, lpszRemoteFile, dwInternetFlags);
...@@ -1345,12 +1345,10 @@ BOOL WINAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, ...@@ -1345,12 +1345,10 @@ BOOL WINAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile,
} }
} }
lend:
if (lpwfs->lstnSocket != -1) if (lpwfs->lstnSocket != -1)
closesocket(lpwfs->lstnSocket); closesocket(lpwfs->lstnSocket);
if (INVALID_HANDLE_VALUE != hFile) CloseHandle(hFile);
CloseHandle(hFile);
hIC = lpwfs->lpAppInfo; hIC = lpwfs->lpAppInfo;
if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC) if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC)
......
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