You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by jb...@apache.org on 2002/05/06 10:49:16 UTC
cvs commit: xml-xindice/java/src/org/apache/xindice/core Database.java
jbates 02/05/06 01:49:16
Modified: java/src/org/apache/xindice/core Database.java
Log:
Fixes bug that in Database.java causing it to incorrectly detect absolute paths
on Windoze...
Submitted by: Sean Kelly <ke...@ad1440.net>
Reviewed by: James Bates <ja...@amplexor.com>
Revision Changes Path
1.3 +7 -6 xml-xindice/java/src/org/apache/xindice/core/Database.java
Index: Database.java
===================================================================
RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/core/Database.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Database.java 26 Feb 2002 07:10:09 -0000 1.2
+++ Database.java 6 May 2002 08:49:16 -0000 1.3
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: Database.java,v 1.2 2002/02/26 07:10:09 kstaken Exp $
+ * $Id: Database.java,v 1.3 2002/05/06 08:49:16 jbates Exp $
*/
import org.apache.xindice.core.query.*;
@@ -121,11 +121,12 @@
setCanonicalName('/' + getName());
String dbroot = config.getAttribute(DBROOT);
- if ( ! dbroot.startsWith("/") ) {
- dbroot = System.getProperty( PROP_XINDICE_HOME ) +
- "/" + dbroot;
- }
- setCollectionRoot(new File(dbroot));
+ File dbrootDir = new File(dbroot);
+ if (!dbrootDir.isAbsolute())
+ dbrootDir = new File(System.getProperty( PROP_XINDICE_HOME ),
+ dbroot);
+ setCollectionRoot(dbrootDir);
+
// Create the security manager so that it exists for loading the system
// collections.