Bug 341078 - Right-click>Compress>As zip archive produces corrupt zipfile
Summary: Right-click>Compress>As zip archive produces corrupt zipfile
Status: RESOLVED DUPLICATE of bug 340456
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 2.19
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-18 11:52 UTC by kevin
Modified: 2015-05-16 22:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kevin 2014-11-18 11:52:10 UTC
Using the kio_slave for Ark on Ubuntu 14.04 running KDE 4.14.2 gives corrupt zipfiles which appear to be fine on the originating machine, but will not open in other applications or platforms.

Recent examples:
Creating a zipfile of jpgs produced a file which was rejected by Gmail and would not open on Microsoft Windows.
Unzipping an odt, changing the 

Reproducible: Always

Steps to Reproduce:
1. Right-click an odt file, and select Extract > Extract Archive Here
2. Go into the resulting folder, open content.xml in a text editor (eg Geany), make a change to a content word, and save the file.
3. Select all the files in the folder: Ctrl+A.
4. Right-click > Compress > As ZIP archive
5. Click on the resulting zipfile - Ark opens it, and clicking on content.xml shows the word-change.
6. Rename the file to odt.

Actual Results:  
Opening the odt file in LibreOffice Writer gives garbage contents.
Similarly, zipping files and sending them to someone on Microsoft Windows gives them a corrupt zipfile which will not open.

Expected Results:  
A zipfile which will open successfully in other applications and on other platforms.

Note that doing the zip manually works:
1. Go into the folder of files to be zipped.
2. In a terminal, run: zip -r name_of_zip *
3. Rename the resulting zipfile to odt.
4. It opens fine in LibreOffice Writer, showing the content as expected.
Likewise, a manually-created zipfile opens on Microsoft Windows.
Comment 1 kevin 2014-11-18 11:53:53 UTC
s/Unzipping an odt, changing the/Unzipping an odt, changing the text, rezipping it, changing the extension to odt and opening it in LibreOffice Writer gives garbage content.
Comment 2 Raphael Kubo da Costa 2014-11-18 11:56:37 UTC
This is a bug in the Kubuntu packaging -- they've inherited a patch from Debian that changes the backend used for zip archives, and their version does not have the ability to modify zip files. Debian has since fixed it, but Kubuntu has not caught up. Please file a bug for the Kubuntu package maintainers.

*** This bug has been marked as a duplicate of bug 340456 ***
Comment 3 kevin 2014-11-18 12:18:17 UTC
Cool, Raphael - thanks for the info.

I've reported the bug at Launchpad:
https://bugs.launchpad.net/ubuntu/+source/ark/+bug/1393753
Comment 4 Ferry 2015-05-06 21:46:19 UTC
It looks like this is solved in vivid, but I'm not sure as I have ark_15.04.0-0ubuntu1~ubuntu15.04~ppa1_amd64 from Kubuntu Backport PPA.

ark -v reports:
Qt: 4.8.6
KDE Development Platform: 4.14.7
Ark: 2.19

I tested this by using dolphin to zip a file and then used file filename.zip to verify the type. I did not test the file by f.i. using winzip in windows.
Comment 5 Christoph Feck 2015-05-16 22:24:02 UTC

*** This bug has been marked as a duplicate of bug 340456 ***