From 614eeba75456e54a13c54b131c37baa12d751651 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Thu, 11 Apr 2002 07:29:58 +0000 Subject: [PATCH] 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 --- .../apache/tools/ant/taskdefs/optional/dotnet/CSharp.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java index 3ce46d665..cd8dfd0a7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java @@ -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;