ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hassan Mehmet <hassan_meh...@hotmail.com>
Subject Re: ant dotnet csc task fails if (MS) file or directory name contains spaces
Date Tue, 16 Jan 2007 16:10:12 GMT
Hassan Mehmet <hassan_mehmet <at> hotmail.com> writes:

> 
> Hi
> 
> Hopefully this is also the forum for antlib projects :)
> 
> I have found a problem with the csc task in ant-dotnet-1.0.jar. If the file 
or 
> directory contains spaces then the csc command fails on windows.
> 
> There seems to be a very simple fix which I have used locally and appears to 
> work. I'm not sure what the procedure is for getting this into the 
repository 
> so hopefully someone can pick it up.
> 
> In class 
> 
> org.apache.ant.dotnet.compile.DotnetBaseMatchingTask
> 
> protected void addFilesToCommand(...)
> {
>    ...
> 
>    // line 149 original: command.addArgument(file.toString());
>    command.addArgument('"'+file.toString()+'"');
> 
>    ...
> }

A similar fix was needed for destFile

In org.apache.ant.dotnet.compile.DotnetCompile

protected String getDestFileParameter() {
   ...
      // line 702 original: return "/out:" + outputFile.toString();
      return "/out:" + '"' + outputFile.toString() + '"';

   ...
}

Regards



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message