diff --git a/src/ioslaves/ftp/ftp.cpp b/src/ioslaves/ftp/ftp.cpp --- a/src/ioslaves/ftp/ftp.cpp +++ b/src/ioslaves/ftp/ftp.cpp @@ -1081,8 +1081,8 @@ if (_offset > 0 && qstrcmp(_command, "retr") == 0 && (m_iRespType == 4)) { errorcode = ERR_CANNOT_RESUME; } - // The error here depends on the command - errormessage = _path; + // The error code here depends on the command + errormessage = _path + i18n("\nThe server said: \"%1\"", QString::fromUtf8(ftpResponse(0)).trimmed()); } else { @@ -2355,14 +2355,16 @@ qCDebug(KIO_FTP) << "local file" << sCopyFile << "-> ftp" << dest.path(); cs = ftpCopyPut(iError, iCopyFile, sCopyFile, dest, permissions, flags); if (cs == statusServerError) { - sCopyFile = dest.toString(); + ftpCloseCommand(); + return; } } else if (!bSrcLocal && bDestLocal) { // Ftp -> File sCopyFile = dest.toLocalFile(); qCDebug(KIO_FTP) << "ftp" << src.path() << "-> local file" << sCopyFile; cs = ftpCopyGet(iError, iCopyFile, sCopyFile, src, permissions, flags); if (cs == statusServerError) { - sCopyFile = src.toString(); + ftpCloseCommand(); + return; } } else { error(ERR_UNSUPPORTED_ACTION, QString());