Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3.2
-
None
-
Tested on OS X 10.5.4, built-in ruby 1.8.6, but will appear on all platforms
Description
An unzip invocation like this:
unzip("target" => zip).from_path("base/lib")
will not include only the files in "base/lib" in "target." The files in "base/lib" will be extracted so they are rooted at "target", but all the files in the archive will also be extracted, using their paths as described in the zip file.
This happens because Unzip::FromPath doesn't filter out the other files. A workaround is to include an exclude clause which will remove all the other files. E.g.:
unzip("target" => zip).from_path("base/lib").exclude("base/*/")