Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 307601

Summary: Add support for (sub)path selection in unzip action
Product: [Eclipse Project] Equinox Reporter: Alin Dreghiciu <adreghiciu>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: irbull, pascal
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Alin Dreghiciu CLA 2010-03-31 01:17:14 EDT
Build Identifier: 

In my use cases I must be able to unzip a (sub)directory from a zip archive and consider that subdirectory as it it was the root of the zip. THis means that for a zip with the following structure:

|-a.txtx
|-foo/
    |-b.txt
    |-bar/
        |-car/
            |-c.txt

I should be able to specify the path I want to unzip. For example:

1. I want "foo". This results in a directory structure in target folder:
|-b.txt
|-bar/
    |-car/
        |-c.txt

2. I want "foo/bar". This results in a directory structure in target folder:
|-car/
    |-c.txt

3. I want "**/bar" = any bar subdirectory. This results in a directory structure in target folder:
|-car/
    |-c.txt

I propose that a new optional parameter to be added named "path". When present wil behave as above, when not present current behavior is used.


Reproducible: Always
Comment 1 Alin Dreghiciu CLA 2010-03-31 01:20:45 EDT
I attached the patch for this to bug #307580 as I consider them related.