You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@apache.org on 2001/07/07 16:05:28 UTC

cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types Path.java

conor       01/07/07 07:05:28

  Modified:    src/main/org/apache/tools/ant/types Path.java
  Log:
  Another location where invalid paths can be ignored
  PR: 381
  
  Revision  Changes    Path
  1.18      +8 -1      jakarta-ant/src/main/org/apache/tools/ant/types/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Path.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Path.java	2001/07/05 12:27:43	1.17
  +++ Path.java	2001/07/07 14:05:27	1.18
  @@ -353,7 +353,14 @@
           StringBuffer element = new StringBuffer();
           while (tok.hasMoreTokens()) {
               element.setLength(0);
  -            element.append(resolveFile(project, tok.nextToken()));
  +            String pathElement = tok.nextToken();
  +            try {
  +                element.append(resolveFile(project, pathElement));
  +            }
  +            catch (BuildException e) {
  +                project.log("Dropping path element " + pathElement + " as it is not valid relative to the project", 
  +                            Project.MSG_VERBOSE);
  +            }
               for (int i=0; i<element.length(); i++) {
                   translateFileSep(element, i);
               }