| Summary: | [Import/Export] Windows Explorer can't read zip when 'create only selected directories' selected | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Matthew Dickie <m.dickie> | ||||||
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | kurt2002, markus.kell.r, remy.suen | ||||||
| Version: | 3.5.2 | ||||||||
| Target Milestone: | 4.5 M4 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 451335 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
|
Description
Matthew Dickie
That's bad. Broken since at least 3.5.2. The problem still exists in Eclipse 4.4!
I just fell into the trap reporting another eclipse-problem.
It looks like "Create only selected directories" has a problem if the top level folder is a (java-)project.
The the resulting zip looks like that (x.zip is the exported project):
x.zip:
+ - ""
+ project-filder
+ rest of the project files and folders
That is, there is a top-level-folder named "" (empty name, not quotes) and _under_ that empty-named-folder the project is in the archive.
I could not extract the contents with Windows means.
7-zip is able to handle that. With that you also see that there is a empty-named top-level-folder.
I'll attach to zip's:
XECERR_DEL_SRCFLDR.zip
XECERR_DEL_SRCFLDR_2.zip
The first is ok (selected "Create directory structure for files"),
the second is the problematic one (selected "Create only selected directories").
For both "Save in zip format" and "Compress the..." were selected.
The selection for export to archive was the project itself.
Created attachment 245633 [details]
exported project - correct zip
see my last comment
Created attachment 245634 [details]
exported project - incorrect zip
see my last comment
The Zip file format spec is clear:
4.4.17 file name: (Variable)
4.4.17.1 The name of the file, with optional relative path.
The path stored MUST not contain a drive or
device letter, or a leading slash.
org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation#createDestinationName(int, IResource) fell into the trap of bug 451335 and created Zips with invalid path names that start with a '/'.
Fixed with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b3156d784a5bb5aee8131a604f2324168b7da8b7
|