brett       2004/07/01 05:39:05

  Modified:    src/java/org/apache/maven/jelly Tag: MAVEN-1_0-BRANCH
                        MavenJellyContext.java
  Log:
  make sure all absolute paths on windows are treated as such, even if there is no 
drive designator
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.35.4.11 +4 -3      maven/src/java/org/apache/maven/jelly/MavenJellyContext.java
  
  Index: MavenJellyContext.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/MavenJellyContext.java,v
  retrieving revision 1.35.4.10
  retrieving revision 1.35.4.11
  diff -u -r1.35.4.10 -r1.35.4.11
  --- MavenJellyContext.java    30 Jun 2004 11:59:50 -0000      1.35.4.10
  +++ MavenJellyContext.java    1 Jul 2004 12:39:05 -0000       1.35.4.11
  @@ -699,12 +699,13 @@
           String value = ( String ) getVariable( var );
           File f = new File( value );
   
  -        if ( !f.getParentFile().exists() )
  +        if ( f.getParentFile() != null && !f.getParentFile().exists() )
           {
               f.getParentFile().mkdirs();
           }
   
  -        if ( !f.isAbsolute() )
  +        // Need to check for / at the start to convince windows that it is absolute
  +        if ( !f.isAbsolute() && !value.startsWith( "/" ) && !value.startsWith( "\\" 
) )
           {
               f = new File( basedir, f.getPath() );
               log.debug( "Resolving " + var + " to " + f );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to