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 @@ -2368,12 +2368,10 @@ QT_CLOSE(iCopyFile); } ftpCloseCommand(); // must close command! - if (cs != statusServerError) { - if (iError) { - error(iError, sCopyFile); - } else { - finished(); - } + if (cs == statusServerError && iError) { + error(iError, sCopyFile); + } else { + finished(); } }