diff --git a/docs/manual/CoreTasks/ant.html b/docs/manual/CoreTasks/ant.html index 58310f5c5..c61721491 100644 --- a/docs/manual/CoreTasks/ant.html +++ b/docs/manual/CoreTasks/ant.html @@ -219,7 +219,7 @@ a <path> with the id path1, but new project using the id path2.


-

Copyright © 2001 Apache Software Foundation. All rights +

Copyright © 2001-2002 Apache Software Foundation. All rights Reserved.

diff --git a/src/etc/testcases/taskdefs/gzip.xml b/src/etc/testcases/taskdefs/gzip.xml index a59973505..f4b5e0e8d 100644 --- a/src/etc/testcases/taskdefs/gzip.xml +++ b/src/etc/testcases/taskdefs/gzip.xml @@ -15,7 +15,7 @@ - + diff --git a/src/main/org/apache/tools/ant/taskdefs/Pack.java b/src/main/org/apache/tools/ant/taskdefs/Pack.java index 289a21ef0..9e3dbc215 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Pack.java +++ b/src/main/org/apache/tools/ant/taskdefs/Pack.java @@ -83,11 +83,16 @@ public abstract class Pack extends Task { } private void validate() { - if (zipFile == null || zipFile.getName().equals("")) { + if (zipFile == null) { throw new BuildException("zipfile attribute is required", location); } - if (source == null || source.getName().equals("")) { + if (zipFile.isDirectory()) { + throw new BuildException("zipfile attribute must not " + + "represent a directory!", location); + } + + if (source == null) { throw new BuildException("src attribute is required", location); } diff --git a/src/testcases/org/apache/tools/ant/taskdefs/GzipTest.java b/src/testcases/org/apache/tools/ant/taskdefs/GzipTest.java index d0e4b76ce..372f854eb 100644 --- a/src/testcases/org/apache/tools/ant/taskdefs/GzipTest.java +++ b/src/testcases/org/apache/tools/ant/taskdefs/GzipTest.java @@ -82,11 +82,9 @@ public class GzipTest extends BuildFileTest { expectBuildException("test3", "required argument missing"); } - /** Disable - how could that ever work? public void test4() { - expectBuildException("test4", "attribute zipfile invalid"); + expectBuildException("test4", "zipfile must not point to a directory"); } - */ public void testGZip(){ executeTarget("realTest");