Browse Source

whitespace

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@703153 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 16 years ago
parent
commit
167630e641
2 changed files with 11 additions and 10 deletions
  1. +9
    -9
      src/main/org/apache/tools/ant/taskdefs/Delete.java
  2. +2
    -1
      src/main/org/apache/tools/ant/util/FileUtils.java

+ 9
- 9
src/main/org/apache/tools/ant/taskdefs/Delete.java View File

@@ -661,15 +661,15 @@ public class Delete extends MatchingTask {
*/
private boolean delete(File f) {
if (!FILE_UTILS.tryHardToDelete(f)) {
if (deleteOnExit) {
int level = quiet ? Project.MSG_VERBOSE : Project.MSG_INFO;
log("Failed to delete " + f + ", calling deleteOnExit."
+ " This attempts to delete the file when the Ant jvm"
+ " has exited and might not succeed.", level);
f.deleteOnExit();
return true;
}
return false;
if (deleteOnExit) {
int level = quiet ? Project.MSG_VERBOSE : Project.MSG_INFO;
log("Failed to delete " + f + ", calling deleteOnExit."
+ " This attempts to delete the file when the Ant jvm"
+ " has exited and might not succeed.", level);
f.deleteOnExit();
return true;
}
return false;
}
return true;
}


+ 2
- 1
src/main/org/apache/tools/ant/util/FileUtils.java View File

@@ -1230,7 +1230,8 @@ public class FileUtils {
System.err.println("Rename of " + from + " to " + to + " is a no-op.");
return;
}
if (to.exists() && !(from.equals(to.getCanonicalFile()) || tryHardToDelete(to))) {
if (to.exists() &&
!(from.equals(to.getCanonicalFile()) || tryHardToDelete(to))) {
throw new IOException("Failed to delete " + to + " while trying to rename " + from);
}
File parent = to.getParentFile();


Loading…
Cancel
Save