Add regexps for catching bad CRC for entries
ClosedPublic

Authored by rthomsen on Oct 21 2017, 8:20 AM.

Details

Summary

This adds regexps to cli7z and clizip which catch bad CRC checksums for archive entries when extracting. This fixes bug 384622 that was reported before we added the libzip plugin. Libzipplugin already catches this CRC errors when extracting.

This diff adds a new string, so maybe we should commit it to master?

Test Plan

Open and extract the archive attached to bug 384622 using both cli7z and clizip plugins and verify that an error message appears.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rthomsen created this revision.Oct 21 2017, 8:20 AM
Restricted Application added subscribers: Ark, kde-utils-devel. · View Herald TranscriptOct 21 2017, 8:20 AM

Libzipplugin already catches this CRC errors when extracting.

I don't get the corrupt query when opening the test archive with libzip. Do you?

Libzipplugin already catches this CRC errors when extracting.

I don't get the corrupt query when opening the test archive with libzip. Do you?

No, only when extracting. The problem with this archive is that the CRC checksum is wrong for some files, but the archive itself can be opened (i.e. the central directory is ok).

plugins/cli7zplugin/cliplugin.cpp
277

Would it be possible to split the regexes so that we can show a more descriptive warning message (like we do for clizip)?

rthomsen updated this revision to Diff 21061.Oct 21 2017, 4:06 PM

Provide more useful error message.

rthomsen marked an inline comment as done.Oct 21 2017, 4:07 PM
elvisangelaccio accepted this revision.Oct 21 2017, 4:08 PM
This revision is now accepted and ready to land.Oct 21 2017, 4:08 PM