diff options
Diffstat (limited to 'x11/kdelibs4/files/patch-1171342')
-rw-r--r-- | x11/kdelibs4/files/patch-1171342 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/x11/kdelibs4/files/patch-1171342 b/x11/kdelibs4/files/patch-1171342 new file mode 100644 index 000000000000..e2b9fa34b38e --- /dev/null +++ b/x11/kdelibs4/files/patch-1171342 @@ -0,0 +1,39 @@ +--- ./kdecore/io/karchive.cpp 2010/08/24 19:50:56 1167508 ++++ ./kdecore/io/karchive.cpp 2010/09/03 13:29:40 1171342 +@@ -634,7 +634,10 @@ + + QByteArray KArchiveFile::data() const + { +- archive()->device()->seek( d->pos ); ++ bool ok = archive()->device()->seek( d->pos ); ++ if (!ok) { ++ kWarning() << "Failed to sync to" << d->pos << "to read" << name(); ++ } + + // Read content + QByteArray arr; +@@ -661,7 +664,7 @@ + QFile f( dest + '/' + name() ); + if ( f.open( QIODevice::ReadWrite | QIODevice::Truncate ) ) + { +- archive()->device()->seek( d->pos ); ++ QIODevice* inputDev = createDevice(); + + // Read and write data in chunks to minimize memory usage + const qint64 chunkSize = 1024 * 1024; +@@ -671,12 +674,14 @@ + + while ( remainingSize > 0 ) { + const qint64 currentChunkSize = qMin( chunkSize, remainingSize ); +- const qint64 n = archive()->device()->read( array.data(), currentChunkSize ); ++ const qint64 n = inputDev->read( array.data(), currentChunkSize ); + Q_ASSERT( n == currentChunkSize ); + f.write( array.data(), currentChunkSize ); + remainingSize -= currentChunkSize; + } + f.close(); ++ ++ delete inputDev; + } + } + |