avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/masterstore AbstractFileRepository.java
Date Wed, 03 Apr 2002 10:12:15 GMT
donaldp     02/04/03 02:12:15

  Modified:    src/java/org/apache/avalon/cornerstone/blocks/datasource
                        DefaultDataSourceSelector.java
               src/java/org/apache/avalon/cornerstone/blocks/masterstore
                        AbstractFileRepository.java
  Log:
  here's a quick fix to allow file repositories to be created using an
  absolute file path.  This fixes James bug 6812.
  
  Submitted By: Steve Short <Steve.Short@PostX.com>
  
  Revision  Changes    Path
  1.16      +1 -1      jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/datasource/DefaultDataSourceSelector.java
  
  Index: DefaultDataSourceSelector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/datasource/DefaultDataSourceSelector.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DefaultDataSourceSelector.java	16 Mar 2002 00:18:33 -0000	1.15
  +++ DefaultDataSourceSelector.java	3 Apr 2002 10:12:15 -0000	1.16
  @@ -82,7 +82,7 @@
               {
                   if( !"".equals( driver ) )
                   {
  -                    Class.forName( driver );
  +                    Class.forName( driver, true, Thread.currentThread().getContextClassLoader()
);
                   }
   
                   component = (DataSourceComponent)Class.forName( clazz ).newInstance();
  
  
  
  1.6       +11 -1     jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/masterstore/AbstractFileRepository.java
  
  Index: AbstractFileRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/masterstore/AbstractFileRepository.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractFileRepository.java	16 Mar 2002 00:18:33 -0000	1.5
  +++ AbstractFileRepository.java	3 Apr 2002 10:12:15 -0000	1.6
  @@ -109,7 +109,17 @@
   
           m_path = destination.substring( HANDLED_URL.length() );
   
  -        File directory = new File( m_baseDirectory, m_path );
  +        File directory;
  +
  +        // Check for absolute path
  +        if( m_path.startsWith( "/" ) )
  +        {
  +            directory = new File ( m_path );
  +        } 
  +        else
  +        {
  +            directory = new File( m_baseDirectory, m_path );
  +        }
   
           try
           {
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message