https://bugs.kde.org/show_bug.cgi?id=406135
Bug ID: 406135 Summary: libzipplugin: CRC checksums of files not shown when the first entry in ZIP is a directory Product: ark Version: 18.12.3 Platform: Compiled Sources OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: plugins Assignee: rthoms...@gmail.com Reporter: c822c4f23bca1ea6faac7...@mail.xn--3ds443g CC: elvis.angelac...@kde.org Target Milestone: --- Created attachment 119207 --> https://bugs.kde.org/attachment.cgi?id=119207&action=edit Files for reproducing the bug SUMMARY When a ZIP file contains directory(ies) and file(s), and the first entry in a ZIP file is a directory, Ark will not show the CRC checksums of the file(s). STEPS TO REPRODUCE 1. Create a directory and some files, and place some files into the directory. 2. Check the first entry of the ZIP file and see if it is a directory by running `ziptool test_3.zip stat 0`. 3. Open the ZIP file using Ark. A tar file containing 3 ZIP files has been attached. test_3.zip can be used to reproduce the bug. test_1.zip is created by `zip -r test_1.zip a 1.txt`. test_2.zip is created by `zip --no-dir-entries -r test_2.zip a b`. test_3.zip is created by `zip -r test_3.zip a b random_text.txt`. OBSERVED RESULT For test_1.zip, since the first entry is `1.txt`, the CRC checksums of all files are displayed correctly. For test_2.zip, all files are stored inside the directories, but since `--no-dir-entries` is used (not creating entries for directories), the CRC checksums of all files are displayed correctly. For test_3.zip, the first entry is `a/` (directory), and the CRC checksums of `2.txt`, `3.txt` and `random_text.txt` are not shown. EXPECTED RESULT For test_3.zip, Ark should show the CRC checksums of `2.txt`, `3.txt` and `random_text.txt`. ADDITIONAL INFORMATION If I change lines 305 to 307 of `plugins/libzipplugin/libzipplugin.cpp` and remove the condition `if (!e->isDir())`, then the problem can be partially fixed - Ark will show CRC "0" for directories and CRC checksums for the files (such as "DB410B7F" for `a/2.txt`) when opening test_3.zip. When opening RAR files, there is no similar bug, and Ark will show CRC "00000000" for directories. -- You are receiving this mail because: You are watching all bug changes.