ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Tar.java
Date Thu, 08 Feb 2001 00:42:47 GMT
nico        01/02/07 16:42:28

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_13_BRANCH
                        Tar.java
  Log:
  Additional checks for the tarfile-attribute - tar allowed to specify tarfile=""; the testcase
failed.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.10.2.1  +10 -0     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java
  
  Index: Tar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- Tar.java	2001/02/04 13:58:16	1.10
  +++ Tar.java	2001/02/08 00:42:18	1.10.2.1
  @@ -119,6 +119,16 @@
                                        location);
           }
   
  +        if (tarFile.exists() && tarFile.isDirectory()) {
  +            throw new BuildException("tarfile is a directory!", 
  +                                     location);
  +        }
  +
  +        if (tarFile.exists() && !tarFile.canWrite()) {
  +            throw new BuildException("Can not write to the specified tarfile!", 
  +                                     location);
  +        }
  +
           if (baseDir != null) {
               if (!baseDir.exists()) {
                   throw new BuildException("basedir does not exist!", location);
  
  
  

Mime
View raw message