Paul Vriens : wininet/ftp: Let CreateFile deal with last error.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Mar 1 05:59:48 CST 2007
Module: wine
Branch: master
Commit: 23473ccc9e47c4e23b9bc11d2d9dc3fd10d71b51
URL: http://source.winehq.org/git/wine.git/?a=commit;h=23473ccc9e47c4e23b9bc11d2d9dc3fd10d71b51
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Thu Mar 1 12:01:04 2007 +0100
wininet/ftp: Let CreateFile deal with last error.
---
dlls/wininet/ftp.c | 4 +---
dlls/wininet/tests/ftp.c | 3 +++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c
index 81ebdb9..0931ccc 100644
--- a/dlls/wininet/ftp.c
+++ b/dlls/wininet/ftp.c
@@ -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;
diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c
index b10e8d1..b12f88b 100644
--- a/dlls/wininet/tests/ftp.c
+++ b/dlls/wininet/tests/ftp.c
@@ -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 */
More information about the wine-cvs
mailing list