Review Request: Fix KArchiveFile::copyTo() for large files
Christoph Feck
christoph at maxiom.de
Wed Aug 11 00:29:14 BST 2010
> On 2010-08-08 20:16:31, Allen Winter wrote:
> > /trunk/KDE/kdelibs/kdecore/io/karchive.cpp, line 674
> > <http://reviewboard.kde.org/r/4938/diff/1/?file=33194#file33194line674>
> >
> > does it make better sense to return false and change copyTo() a boolean method?
> >
Makes sense, but I am not sure if changing the return type of a function is ABI compatible.
I could add a new function which returns an qint64 with the actually copied number of bytes and make the old one call the new one. Suggestions for the name?
qint64 copyToFile(const QString &fileName) ?
- Christoph
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4938/#review6877
-----------------------------------------------------------
On 2010-08-08 20:00:59, Christoph Feck wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4938/
> -----------------------------------------------------------
>
> (Updated 2010-08-08 20:00:59)
>
>
> Review request for kdelibs.
>
>
> Summary
> -------
>
> This fixes KArchiveFile::copyTo() to read in chunks (same as KArchive::addLocalFile(), i.e. 8192 byte chunks) instead of loading the whole file into a single QByteArray (and overflow large files due to that).
>
>
> This addresses bug 237124.
> https://bugs.kde.org/show_bug.cgi?id=237124
>
>
> Diffs
> -----
>
> /trunk/KDE/kdelibs/kdecore/io/karchive.cpp 1160676
>
> Diff: http://reviewboard.kde.org/r/4938/diff
>
>
> Testing
> -------
>
> I successfully downloaded and installed the UNSO NOMAD catalog mentioned in the bug report using the KStars GHNS dialog. During download and copying/extracting the RES memory size of process kstars did not exceed 60 MB. The download file size was 1450631611 (1.35 GiB), the extracted destination file size was 2173117930 (2.02 GiB).
>
>
> Thanks,
>
> Christoph
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100810/e69e5c2c/attachment.htm>
More information about the kde-core-devel
mailing list