Review Request 125363: Improve handling of corrupt archives by CliPlugins

Elvis Angelaccio elvis.angelaccio at kdemail.net
Sun Oct 4 12:51:20 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125363/#review86335
-----------------------------------------------------------

Ship it!



kerfuffle/queries.cpp (line 216)
<https://git.reviewboard.kde.org/r/125363/#comment59476>

    Please use `xi18nc()`, as the other queries do.


- Elvis Angelaccio


On Sept. 23, 2015, 5:06 p.m., Ragnar Thomsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125363/
> -----------------------------------------------------------
> 
> (Updated Sept. 23, 2015, 5:06 p.m.)
> 
> 
> Review request for KDE Utils, Elvis Angelaccio and Raphael Kubo da Costa.
> 
> 
> Bugs: 261073 and 352949
>     http://bugs.kde.org/show_bug.cgi?id=261073
>     http://bugs.kde.org/show_bug.cgi?id=352949
> 
> 
> Repository: ark
> 
> 
> Description
> -------
> 
> A new parameter was added to the Kerfuffle::CliInterfaceParameters enum (called CorruptArchivePatterns), containing a list of regexps matching output from CliPlugins when a corrupt archive is listed.
> 
> Due to the CliInterface not being able to launch a KMessageBox itself, a query (LoadCorruptQuery) was added which launches a KMessageBox::warningYesNo asking the user if he wants to try to load the corrupt archive. This is necessary because some files might still be recoverable. 
> 
> If the user answers no, loading of the archive is cancelled.
> 
> If the user answers yes the archive is loaded as usual, but to prevent the user from trying to add/delete files from the corrupt archive (which is likely to fail), the archive is set to readonly. This necessitated a new private member in ReadOnlyArchiveInterface (m_isCorrupt) and getter/setter functions. The setter function is used in CliInterface::HandleLine, while the getter function is used in ReadWriteArchiveInterface::isReadOnly().
> 
> Archives can be corrupt in different ways (missing end-of-file, corrupt file header, corrupt entries etc.). Therefore I'm not certain that the regexps catch all forms of corrupt archives at the moment. However, new patterns can easily be added when we discover them.
> 
> 
> Diffs
> -----
> 
>   kerfuffle/archiveinterface.h 1aac2a4 
>   kerfuffle/archiveinterface.cpp d8a6725 
>   kerfuffle/cliinterface.h 02f61be 
>   kerfuffle/cliinterface.cpp 179f94f 
>   kerfuffle/queries.h 1630c5e 
>   kerfuffle/queries.cpp 36afaec 
>   plugins/cli7zplugin/cliplugin.cpp 3915cb6 
>   plugins/clirarplugin/cliplugin.cpp e631491 
>   plugins/clizipplugin/cliplugin.cpp 7eaeaaa 
> 
> Diff: https://git.reviewboard.kde.org/r/125363/diff/
> 
> 
> Testing
> -------
> 
> Tried opening various corrupt rar, zip and 7z archives.
> 
> 
> File Attachments
> ----------------
> 
> KMessageBox
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/09/23/9fa75094-297c-4116-a1c3-a8cb3668b8e2__Corrupt-1.png
> 
> 
> Thanks,
> 
> Ragnar Thomsen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20151004/ef299489/attachment.html>


More information about the Kde-utils-devel mailing list