ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Zip.java
Date Wed, 25 Apr 2001 14:12:16 GMT
bodewig     01/04/25 07:12:16

  Modified:    src/main/org/apache/tools/ant/taskdefs Zip.java
  Log:
  Use current time instead of something illegal when we don't know the
  last modification time of a dir.
  
  Revision  Changes    Path
  1.38      +5 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- Zip.java	2001/04/24 07:13:31	1.37
  +++ Zip.java	2001/04/25 14:12:14	1.38
  @@ -413,7 +413,11 @@
           addedDirs.put(vPath, vPath);
           
           ZipEntry ze = new ZipEntry (vPath);
  -        if (dir != null) ze.setTime (dir.lastModified ());
  +        if (dir != null && dir.exists()) {
  +            ze.setTime(dir.lastModified());
  +        } else {
  +            ze.setTime(System.currentTimeMillis());
  +        }
           ze.setSize (0);
           ze.setMethod (ZipEntry.STORED);
           // This is faintly ridiculous:
  
  
  

Mime
View raw message