Review Request: Report file errors when extracting files using karchive
Raphael Kubo da Costa
rakuco at freebsd.org
Sat Jan 28 17:27:03 GMT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103808/#review10182
-----------------------------------------------------------
Not sure if this is 4.x material or frameworks-only (I occasionally see karchive undergoing some changes there). Only returning errors from that QFile::write call seems weird IMHO (other parts of the code may fail too).
kdecore/io/karchive.h
<http://git.reviewboard.kde.org/r/103808/#comment8364>
The documentation is still missing the "@since" tag.
kdecore/io/karchive.cpp
<http://git.reviewboard.kde.org/r/103808/#comment8367>
If you're just breaking out of the loop in the next iteration, why not do something like this:
while (remainingSize > 0) {
// yadda, yadda
if (f.write(...) == -1) {
d->fileError = f.error();
break;
}
}
- Raphael Kubo da Costa
On Jan. 28, 2012, 4:46 p.m., Theofilos Intzoglou wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103808/
> -----------------------------------------------------------
>
> (Updated Jan. 28, 2012, 4:46 p.m.)
>
>
> Review request for kdelibs.
>
>
> Description
> -------
>
> A simple patch to check if something goes wrong when extracting files from an archive. You can read the error code using copyToErrorCode()
>
>
> Diffs
> -----
>
> kdecore/io/karchive.h 7cd7c0c
> kdecore/io/karchive.cpp 86d61d5
>
> Diff: http://git.reviewboard.kde.org/r/103808/diff/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Theofilos Intzoglou
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120128/ba1cafb9/attachment.htm>
More information about the kde-core-devel
mailing list