Version: (using KDE KDE 3.4.0) Installed from: Gentoo Packages OS: Linux Instead of 6061145769 bytes (in console client; or ssh remote ls -l) there are 1766178473 bytes reported. Fatal misbehaviour - whats up?
Already the second time I get this strange behaviour, this time on another file. via sftp or ssh the correct size is 5401559040 bytes but kio_sftp reports 1106591744 bytes. Fatal misbehaviour.
Seems to be the 2^32 bit limit that loops the size. Instead of the acutal size, SIZE % 2^32 is reported The same limit exists for the kio_smb handler: http://bugs.kde.org/show_bug.cgi?id=92765
Duplicate report for kio_smb: http://bugs.kde.org/show_bug.cgi?id=85653
Annotation: The file size works correctly for kio_file and kio_fish, but fish doesn't give me the ability to resume uploads since it doesn't support *.part
Update: kio_ftp also displays the size correct.
Is there anyway you can try the attached patch and see if it fixes your problem ? On Monday 18 April 2005 14:05, Thomas Bettler wrote: [bugs.kde.org quoted mail] Created an attachment (id=10802) sftp34.diff
CVS commit by adawit: - Fix problem with symlinks not being clickable randomly. - Fix the out of memory problem on x64 platforms. - Fix wrong file size being reported for really large files. BUGS:99928 BUGS:102103 BUGS:103729 M +290 -265 kio_sftp.cpp 1.65 M +24 -23 sftpfileattr.cpp 1.16 M +12 -14 sftpfileattr.h 1.12
I'm sorry to report that, but I just compiled kio_sftp from cvs and the size is still reported wrong. But anyway thanks a lot for your fixing and your assistance.
I'm sorry to report that, but I just compiled kio_sftp from cvs and the size is still reported wrong. (Forgot to reopen it)
Can you please try the attached patch and see if it solves the problem for you ? On Wednesday 27 April 2005 14:49, Thomas Bettler wrote: [bugs.kde.org quoted mail] Created an attachment (id=10819) 103729.diff
I just tried it. This patch rocks! And fixes the size issue! Thank you for your hard work. I'm really glad now. You may close this bug.
CVS commit by adawit: - Real fix for the incorrect size reported for really big files. BUGS:103729 M +12 -13 sftpfileattr.cpp 1.18 --- kdebase/kioslave/sftp/sftpfileattr.cpp #1.17:1.18 @@ -156,7 +156,6 @@ QDataStream& operator>> (QDataStream& s, fa.clear(); - QByteArray fn; - Q_ULLONG size; if( fa.mDirAttrs ) { + QByteArray fn; s >> fn; @@ -165,20 +164,18 @@ QDataStream& operator>> (QDataStream& s, s >> fa.mLongname; - size = fa.mLongname.size(); - fa.mLongname.resize(size+1); - fa.mLongname[size] = 0; - //kdDebug() << ">> sftpfileattr filename (" << fa.mFilename.size() << ")= " << fa.mFilename << endl; + fa.mLongname.truncate( fa.mLongname.size() ); + //kdDebug() << ">>: ftpfileattr long filename (" << fa.mLongname.size() << ")= " << fa.mLongname << endl; } - Q_UINT32 x; s >> fa.mFlags; // get flags if( fa.mFlags & SSH2_FILEXFER_ATTR_SIZE ) { - // since we don't have a 64 bit int, ignore the top byte. - // Very bad if we get a > 2^32 size - s >> x; - s >> x; fa.setFileSize(x); + Q_ULLONG fileSize; + s >> fileSize; + fa.setFileSize(fileSize); } + Q_UINT32 x; + if( fa.mFlags & SSH2_FILEXFER_ATTR_UIDGID ) { s >> x; fa.setUid(x); @@ -186,6 +183,7 @@ QDataStream& operator>> (QDataStream& s, } - if( fa.mFlags & SSH2_FILEXFER_ATTR_PERMISSIONS ) - { s >> x; fa.setPermissions(x); } + if( fa.mFlags & SSH2_FILEXFER_ATTR_PERMISSIONS ) { + s >> x; fa.setPermissions(x); + } if( fa.mFlags & SSH2_FILEXFER_ATTR_ACMODTIME ) {
*** Bug 105114 has been marked as a duplicate of this bug. ***