ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/util SourceFileScanner.java
Date Wed, 29 Nov 2000 14:42:50 GMT
bodewig     00/11/29 06:42:49

  Modified:    src/main/org/apache/tools/ant/util SourceFileScanner.java
  Log:
  Take into account that lastModified times are rounded up to the next
  two second interval by Windows.
  
  Submitted by:	Roger Vaughn <rogervaughn@yahoo.com>
  
  Revision  Changes    Path
  1.5       +11 -1     jakarta-ant/src/main/org/apache/tools/ant/util/SourceFileScanner.java
  
  Index: SourceFileScanner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/SourceFileScanner.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SourceFileScanner.java	2000/11/16 17:05:40	1.4
  +++ SourceFileScanner.java	2000/11/29 14:42:49	1.5
  @@ -23,7 +23,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
  + * 4. The names "The Jakarta Project", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -97,6 +97,16 @@
   
           long now = (new java.util.Date()).getTime();
           StringBuffer targetList = new StringBuffer();
  +
  +        /*
  +          If we're on Windows, we have to munge the time up to 2 secs to
  +          be able to check file modification times.
  +          (Windows has a max resolution of two secs for modification times)
  +        */
  +        String osname = System.getProperty("os.name").toLowerCase();
  +        if ( osname.indexOf("windows") >= 0 ) {
  +            now += 2000;
  +        }
   
           Vector v = new Vector();
           for (int i=0; i< files.length; i++) {
  
  
  

Mime
View raw message