Git commit 0a0368bac3e1586328f6d0869f62ef14687906ea by Dawit Alemayehu. Committed on 18/03/2011 at 17:57. Pushed by adawit into branch 'KDE/4.6'. Allow copying of zero byte sized files. BUG:184594 FIXED-IN:4.6.2 M +5 -4 kioslave/ftp/ftp.cpp http://commits.kde.org/kdelibs/0a0368bac3e1586328f6d0869f62ef14687906ea diff --git a/kioslave/ftp/ftp.cpp b/kioslave/ftp/ftp.cpp index ca0ba61..95c4450 100644 --- a/kioslave/ftp/ftp.cpp +++ b/kioslave/ftp/ftp.cpp @@ -2142,11 +2142,12 @@ bool Ftp::ftpSize( const QString & path, char mode ) return false; // skip leading "213 " (response code) - const char* psz = ftpResponse(4); - if(!psz) + QByteArray psz (ftpResponse(4)); + if(psz.isEmpty()) return false; - m_size = charToLongLong(psz); - if (!m_size) m_size = UnknownSize; + bool ok = false; + m_size = psz.trimmed().toLongLong(&ok); + if (!ok) m_size = UnknownSize; return true; }