stephan     2004/03/14 02:34:34

  Modified:    tools/src/anttasks XConfToolTask.java
  Log:
  Minor bug: The destination file is not modified, if no patch
  file in the second run was applied.
  
  Revision  Changes    Path
  1.20      +5 -3      cocoon-2.1/tools/src/anttasks/XConfToolTask.java
  
  Index: XConfToolTask.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/tools/src/anttasks/XConfToolTask.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XConfToolTask.java        11 Mar 2004 15:13:02 -0000      1.19
  +++ XConfToolTask.java        14 Mar 2004 10:34:34 -0000      1.20
  @@ -151,10 +151,11 @@
   
               DirectoryScanner scanner = getDirectoryScanner(this.srcdir);
               String[] list = scanner.getIncludedFiles();
  -            boolean hasChanged = false;
  +            boolean modified = false;
               // process recursive
               File patchfile;
               ArrayList suspended = new ArrayList();
  +            boolean hasChanged = false;
               for (int i = 0; i < list.length; i++) {
                   patchfile = new File(this.srcdir, list[i]);
                   try {
  @@ -168,6 +169,7 @@
                       log("Ignoring: "+patchfile+"\n(not a valid XML)");
                   }
               }
  +            modified = hasChanged;
   
               if (hasChanged && !suspended.isEmpty()) {
                   log("Try to apply suspended patch files");
  @@ -200,7 +202,7 @@
                   }
               }
   
  -            if (hasChanged) {
  +            if (modified) {
                   log("Writing: " + this.file);
                   // Set the DOCTYPE output option on the transformer 
                   // if we have any DOCTYPE declaration in the input xml 
document
  
  
  

Reply via email to