Browse Source

Turn warning about input = output into an exception. Filling up your disk

is not a good behaviour.

PR:	17154


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274117 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 22 years ago
parent
commit
dd4954b1b6
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/Concat.java

+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/Concat.java View File

@@ -355,8 +355,9 @@ public class Concat extends Task {
// Make sure input != output.
if (destinationFile != null &&
destinationFile.getAbsolutePath().equals(input[i])) {
log(destinationFile.getName() + ": input file is " +
"output file.", Project.MSG_WARN);
throw new BuildException("Input file \""
+ destinationFile.getName()
+ "\" is the same as the output file.");
}

is = new FileInputStream(input[i]);


Loading…
Cancel
Save