ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant ProjectHelper.java
Date Mon, 31 Jul 2000 14:20:19 GMT
bodewig     00/07/31 07:20:13

  Modified:    src/main/org/apache/tools/ant ProjectHelper.java
  Log:
  Didn't set the basedir correctly if the attribute to project was
  ommitted and the basedir was not the process's working directory.
  
  Revision  Changes    Path
  1.22      +6 -2      jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- ProjectHelper.java	2000/07/24 14:54:48	1.21
  +++ ProjectHelper.java	2000/07/31 14:20:11	1.22
  @@ -204,7 +204,7 @@
               String def = null;
               String name = null;
               String id = null;
  -            String baseDir = new File(buildFile.getAbsolutePath()).getParent();
  +            String baseDir = null;
   
               for (int i = 0; i < attrs.getLength(); i++) {
                   String key = attrs.getName(i);
  @@ -233,7 +233,11 @@
               if (project.getProperty("basedir") != null) {
                   project.setBasedir(project.getProperty("basedir"));
               } else {
  -                project.setBasedir((new File(buildFile.getParent(), baseDir)).getAbsolutePath());
  +                if (baseDir == null) {
  +                    project.setBasedir((new File(buildFile.getParent())).getAbsolutePath());
  +                } else {
  +                    project.setBasedir((new File(buildFile.getParent(), baseDir)).getAbsolutePath());
  +                }
               }
   
           }
  
  
  

Mime
View raw message