<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/125363/">https://git.reviewboard.kde.org/r/125363/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/125363/diff/1/?file=405138#file405138line216" style="color: black; font-weight: bold; text-decoration: underline;">kerfuffle/queries.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">216</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">xi18n</span><span class="p">(</span><span class="s">"Corrupt archive detected. Do you want Ark to attempt "</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Please use <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">xi18nc()</code>, as the other queries do.</p></pre>
</div>
</div>
<br />
<p>- Elvis Angelaccio</p>
<br />
<p>On September 23rd, 2015, 5:06 p.m. UTC, Ragnar Thomsen wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Utils, Elvis Angelaccio and Raphael Kubo da Costa.</div>
<div>By Ragnar Thomsen.</div>
<p style="color: grey;"><i>Updated Sept. 23, 2015, 5:06 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=261073">261073</a>,
<a href="http://bugs.kde.org/show_bug.cgi?id=352949">352949</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
ark
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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. </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If the user answers no, loading of the archive is cancelled.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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().</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Tried opening various corrupt rar, zip and 7z archives.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kerfuffle/archiveinterface.h <span style="color: grey">(1aac2a4)</span></li>
<li>kerfuffle/archiveinterface.cpp <span style="color: grey">(d8a6725)</span></li>
<li>kerfuffle/cliinterface.h <span style="color: grey">(02f61be)</span></li>
<li>kerfuffle/cliinterface.cpp <span style="color: grey">(179f94f)</span></li>
<li>kerfuffle/queries.h <span style="color: grey">(1630c5e)</span></li>
<li>kerfuffle/queries.cpp <span style="color: grey">(36afaec)</span></li>
<li>plugins/cli7zplugin/cliplugin.cpp <span style="color: grey">(3915cb6)</span></li>
<li>plugins/clirarplugin/cliplugin.cpp <span style="color: grey">(e631491)</span></li>
<li>plugins/clizipplugin/cliplugin.cpp <span style="color: grey">(7eaeaaa)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/125363/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/09/23/9fa75094-297c-4116-a1c3-a8cb3668b8e2__Corrupt-1.png">KMessageBox</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>