Skip to content
Commit 170115f1 authored by Ragnar Thomsen's avatar Ragnar Thomsen
Browse files

Improve handling of corrupt archives by CliPlugins

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 useful 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().

BUG: 261073
BUG: 352949
FIXED-IN: 15.12.0
REVIEW: 125363
parent f23b9ea9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment