ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
Date Mon, 14 Mar 2005 14:58:55 GMT
bodewig     2005/03/14 06:58:54

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/taskdefs/optional/dotnet
                        DotnetCompile.java
  Log:
  References may point to files with spaces in their names, quote them
  
  Revision  Changes    Path
  1.778     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.777
  retrieving revision 1.778
  diff -u -r1.777 -r1.778
  --- WHATSNEW	14 Mar 2005 11:46:00 -0000	1.777
  +++ WHATSNEW	14 Mar 2005 14:58:54 -0000	1.778
  @@ -267,6 +267,9 @@
   * <csc>'s extraoptions can now contain multiple arguments.
     Bugzilla Report 23599.
   
  +* The .NET compilation tasks failed if filenames given as references
  +  contained spaces.  Bugzilla Report 27170.
  +
   Fixed bugs:
   -----------
   
  
  
  
  1.27      +12 -5     ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
  
  Index: DotnetCompile.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- DotnetCompile.java	14 Mar 2005 11:46:01 -0000	1.26
  +++ DotnetCompile.java	14 Mar 2005 14:58:54 -0000	1.27
  @@ -219,7 +219,7 @@
       protected String getReferencesParameter() {
           //bail on no references
           if (notEmpty(references)) {
  -            return REFERENCE_OPTION + references;
  +            return REFERENCE_OPTION + '\"' + references + '\"';
           } else {
               return null;
           }
  @@ -270,8 +270,8 @@
           }
   
           StringBuffer s = new StringBuffer(REFERENCE_OPTION);
  -        s.append(refpath);
  -        return new String(s);
  +        s.append('\"').append(refpath).append('\"');
  +        return s.toString();
       }
   
   
  @@ -903,6 +903,8 @@
               if (isFileManagedBinary(file)) {
                   if (!firstEntry) {
                       referenceList.append(getReferenceDelimiter());
  +                } else {
  +                    referenceList.append('\"');
                   }
                   referenceList.append(file.toString());
                   firstEntry = false;
  @@ -912,8 +914,13 @@
               }
   
           }
  -        //add it all to an argument
  -        command.addArgument(referenceList.toString());
  +        // hack: This means we've added at least one reference that's
  +        // a managed binary
  +        if (!firstEntry) {
  +            //add it all to an argument
  +            command.addArgument(referenceList.toString() + '\"');
  +        }
  +        
           return filesOutOfDate;
       }
   
  
  
  

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


Mime
View raw message