Browse Source

try to delete temporary files in fixcrlf. PR 48506.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@898183 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 15 years ago
parent
commit
0591bc2592
2 changed files with 7 additions and 1 deletions
  1. +3
    -0
      WHATSNEW
  2. +4
    -1
      src/main/org/apache/tools/ant/taskdefs/FixCRLF.java

+ 3
- 0
WHATSNEW View File

@@ -9,6 +9,9 @@ Changes that could break older environments:
Fixed bugs:
-----------

* <fixcrlf> now tries earlier to delete the created temporary files.
Bugzilla Report 48506.

Other changes:
--------------



+ 4
- 1
src/main/org/apache/tools/ant/taskdefs/FixCRLF.java View File

@@ -376,10 +376,13 @@ public class FixCRLF extends MatchingTask implements ChainableReader {
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);
}
}
}



Loading…
Cancel
Save