Bug 376225

Summary: reported file size is 0 bytes for single file gzip archive
Product: [Applications] ark Reporter: Marco Martin <notmart>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: RESOLVED FIXED    
Severity: normal CC: rthomsen6
Priority: NOR    
Version First Reported In: 16.12.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 16.12.3
Sentry Crash Report:

Description Marco Martin 2017-02-09 10:21:42 UTC
when an archive that is a single file compressed with gzip, opening it with ark, it will report a size of 0 bytes for that file

to reproduce:
* gzip a single file
* open the file with ark
* reported size is 0
Comment 1 Elvis Angelaccio 2017-02-13 10:36:51 UTC
Git commit c1a72a8e053a859946a4b96effdc9193f7afe10b by Elvis Angelaccio.
Committed on 13/02/2017 at 10:35.
Pushed by elvisangelaccio into branch 'Applications/16.12'.

Fix archivemodel columns with singlefile archives

ArchiveModel was setting 0 as Size with singlefile archives,
because the singlefile plugin doesn't report the uncompressed size.

This patch removes the Size column if the size property is 0 but the
compressedSize one is higher than 0, which cannot happen.
As compressedSize for singlefile entries, we just set the size of the
archive.
FIXED-IN: 16.12.3

Differential Revision: D4536

M  +7    -3    part/archivemodel.cpp
M  +1    -0    plugins/libsinglefileplugin/singlefileplugin.cpp

https://commits.kde.org/ark/c1a72a8e053a859946a4b96effdc9193f7afe10b