[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/kio/kio
From: Thomas McGuire <mcguire () kde ! org>
Date: 2009-12-23 14:38:30
Message-ID: 1261579110.717179.9651.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1065517 by tmcguire:
Backport r978827 by pino from trunk to the 3.5 branch:
Do not confuse the length of file names encoded as UTF-8 and with the local 8bit encoding.
M +4 -3 kzip.cpp
--- branches/KDE/3.5/kdelibs/kio/kio/kzip.cpp #1065516:1065517
@@ -954,8 +954,8 @@
buffer[ 26 ] = char(mysize >> 16);
buffer[ 27 ] = char(mysize >> 24);
- buffer[ 28 ] = char(it.current()->path().length()); // filename length
- buffer[ 29 ] = char(it.current()->path().length() >> 8);
+ buffer[ 28 ] = char(path.length()); // filename length
+ buffer[ 29 ] = char(path.length() >> 8);
buffer[ 30 ] = char(extra_field_len);
buffer[ 31 ] = char(extra_field_len >> 8);
@@ -1294,9 +1294,10 @@
if ( d->m_extraField == ModificationTime )
extra_field_len = 17; // value also used in doneWriting()
+ const QCString encodedName = QFile::encodeName(d->m_currentFile->path());
int csize = device()->at() -
d->m_currentFile->headerStart() - 30 -
- d->m_currentFile->path().length() - extra_field_len;
+ encodedName.length() - extra_field_len;
d->m_currentFile->setCompressedSize(csize);
//kdDebug(7040) << "usize: " << d->m_currentFile->size() << endl;
//kdDebug(7040) << "csize: " << d->m_currentFile->compressedSize() << endl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic