nacho 01/02/04 14:26:48
Modified: src/share/org/apache/tomcat/util FileUtil.java
Log:
Problems with old configs and new config interceptors.
Revision Changes Path
1.19 +6 -6 jakarta-tomcat/src/share/org/apache/tomcat/util/FileUtil.java
Index: FileUtil.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/FileUtil.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- FileUtil.java 2001/02/01 06:17:41 1.18
+++ FileUtil.java 2001/02/04 22:26:48 1.19
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/FileUtil.java,v 1.18
2001/02/01 06:17:41 costin Exp $
- * $Revision: 1.18 $
- * $Date: 2001/02/01 06:17:41 $
+ * $Header:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/FileUtil.java,v 1.19
2001/02/04 22:26:48 nacho Exp $
+ * $Revision: 1.19 $
+ * $Date: 2001/02/04 22:26:48 $
*
* ====================================================================
*
@@ -338,7 +338,7 @@
public static String getExtension( String path ) {
int i = path.lastIndexOf(".");
- int j = path.lastIndexOf("/");
+ int j = path.lastIndexOf(File.separator);
if ((i > 0) && (i > j))
return path.substring(i);
@@ -350,7 +350,7 @@
*/
public static String getBase( String path ) {
int i = path.lastIndexOf(".");
- int j = path.lastIndexOf("/");
+ int j = path.lastIndexOf(File.separator);
if( j < 0 ) {// no /
if( i<0 )
@@ -362,7 +362,7 @@
// . in a dir, before last component, or no "."
return path.substring( j );
} else {
- return path.substring( j, i );
+ return path.substring( j+1, i );
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]