Browse Source

actually, we dont need to mandate an output file, even though doing so breaks dependency checking. So lets not, for compatibility's sake. Oh, and add a test for the destfile not being a directory

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272363 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 23 years ago
parent
commit
614eeba754
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java

+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java View File

@@ -1053,8 +1053,8 @@ public class CSharp
*/
protected void validate()
throws BuildException {
if(outputFile==null) {
throw new BuildException("destination file must be specified");
if(outputFile!=null && outputFile.isDirectory()) {
throw new BuildException("destFile cannot be a directory");
}
}

@@ -1099,7 +1099,7 @@ public class CSharp
command.addArgument(getFileAlignParameter());

long outputTimestamp;
if(outputFile.exists()) {
if(outputFile!=null && outputFile.exists()) {
outputTimestamp = outputFile.lastModified();
} else {
outputTimestamp = 0;


Loading…
Cancel
Save