Bug 376225 - reported file size is 0 bytes for single file gzip archive
Summary: reported file size is 0 bytes for single file gzip archive
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: 16.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-09 10:21 UTC by Marco Martin
Modified: 2017-02-13 10:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 16.12.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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