@@ -146,7 +146,7 @@ public class Expand extends Task {
* This method is to be overridden by extending unarchival tasks.
* This method is to be overridden by extending unarchival tasks.
*/
*/
protected void expandFile(FileUtils fileUtils, File srcF, File dir) {
protected void expandFile(FileUtils fileUtils, File srcF, File dir) {
log("Expanding: " + srcF + " into " + dir, Project.MSG_INFO);
log("Expanding: " + srcF + " into " + dir, Project.MSG_INFO);
ZipInputStream zis = null;
ZipInputStream zis = null;
try {
try {
// code from WarExpand
// code from WarExpand
@@ -186,7 +186,7 @@ public class Expand extends Task {
String[] incls = p.getIncludePatterns(getProject());
String[] incls = p.getIncludePatterns(getProject());
if (incls != null) {
if (incls != null) {
for (int w = 0; w < incls.length; w++) {
for (int w = 0; w < incls.length; w++) {
boolean isIncl =
boolean isIncl =
DirectoryScanner.match(incls[w], name);
DirectoryScanner.match(incls[w], name);
if (isIncl) {
if (isIncl) {
included = true;
included = true;
@@ -197,7 +197,7 @@ public class Expand extends Task {
String[] excls = p.getExcludePatterns(getProject());
String[] excls = p.getExcludePatterns(getProject());
if (excls != null) {
if (excls != null) {
for (int w = 0; w < excls.length; w++) {
for (int w = 0; w < excls.length; w++) {
boolean isExcl =
boolean isExcl =
DirectoryScanner.match(excls[w], name);
DirectoryScanner.match(excls[w], name);
if (isExcl) {
if (isExcl) {
included = false;
included = false;
@@ -225,7 +225,9 @@ public class Expand extends Task {
Project.MSG_VERBOSE);
Project.MSG_VERBOSE);
// create intermediary directories - sometimes zip don't add them
// create intermediary directories - sometimes zip don't add them
File dirF = fileUtils.getParentFile(f);
File dirF = fileUtils.getParentFile(f);
dirF.mkdirs();
if ( dirF != null ) {
dirF.mkdirs();
}
if (isDirectory) {
if (isDirectory) {
f.mkdirs();
f.mkdirs();