ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r898183 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
Date Tue, 12 Jan 2010 05:25:35 GMT
Author: bodewig
Date: Tue Jan 12 05:25:34 2010
New Revision: 898183

URL: http://svn.apache.org/viewvc?rev=898183&view=rev
Log:
try to delete temporary files in fixcrlf.  PR 48506.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=898183&r1=898182&r2=898183&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Tue Jan 12 05:25:34 2010
@@ -9,6 +9,9 @@
 Fixed bugs:
 -----------
 
+ * <fixcrlf> now tries earlier to delete the created temporary files.
+   Bugzilla Report 48506.
+
 Other changes:
 --------------
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java?rev=898183&r1=898182&r2=898183&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java Tue Jan 12 05:25:34
2010
@@ -376,10 +376,13 @@
                         Project.MSG_DEBUG);
                     FILE_UTILS.setFileLastModified(destFile, lastModified);
                 }
-                tmpFile = null;
             }
         } catch (IOException e) {
             throw new BuildException("error running fixcrlf on file " + srcFile, e);
+        } finally {
+            if (tmpFile != null && tmpFile.exists()) {
+                FILE_UTILS.tryHardToDelete(tmpFile);
+            }
         }
     }
 



Mime
View raw message