From 8e82e536cdbf2b6c36a7eabd6fba1a85613973f8 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Tue, 19 Mar 2019 11:41:53 +0100 Subject: FTP: Workaround for servers without HELP command support Ignores errors produced by the HELP command. It will continue executing the commands sent to QFtp when a server does not have a HELP command implemented. Commands SIZE, MDTM, and PWD are not going to be used if the HELP command failed. [ChangeLog][QtNetwork][QNetworkAccessManager] Don't fail when FTP does not implement the HELP command. Task-number: QTBUG-69477 Change-Id: I0ebd51b134535730c6bef83de1abf1a427b8d2ce Reviewed-by: Thiago Macieira Reviewed-by: Edward Welbourne --- src/network/access/qftp.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/network/access/qftp.cpp') diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp index 4e399f018f..b6b721030b 100644 --- a/src/network/access/qftp.cpp +++ b/src/network/access/qftp.cpp @@ -2122,6 +2122,17 @@ void QFtp::abort() d_func()->pi.abort(); } +/*! + \internal + Clears the last error. + + \sa currentCommand() +*/ +void QFtp::clearError() +{ + d_func()->error = NoError; +} + /*! \internal Returns the identifier of the FTP command that is being executed -- cgit v1.2.3