billbarker 02/02/14 18:43:52
Modified: src/share/org/apache/tomcat/util IntrospectionUtils.java
Log:
Fix Tomcat for Mac OS.
Use File.getParent instead of ".." to get the parent directory (since not all OSs
know about ".."). Based on suggestion from Martin Redington.
Fix for bug #6341
Reported by: Martin Redington [EMAIL PROTECTED]
Revision Changes Path
1.18 +8 -2
jakarta-tomcat/src/share/org/apache/tomcat/util/IntrospectionUtils.java
Index: IntrospectionUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/IntrospectionUtils.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- IntrospectionUtils.java 5 Feb 2002 01:32:05 -0000 1.17
+++ IntrospectionUtils.java 15 Feb 2002 02:43:52 -0000 1.18
@@ -189,7 +189,10 @@
home=new File("./").getCanonicalPath();
}
File f=new File( home );
- File f1=new File ( f, "..");
+ String parentDir = f.getParent();
+ if(parentDir == null)
+ parentDir = home; // unix style
+ File f1=new File ( parentDir );
install = f1.getCanonicalPath();
if( installSysProp != null )
System.getProperties().put( installSysProp, install );
@@ -204,7 +207,10 @@
if( new File( fname ).exists()) {
try {
File f=new File( path );
- File f1=new File ( f, "..");
+ String parentDir = f.getParent();
+ if( parentDir == null )
+ parentDir = path; // unix style
+ File f1=new File ( parentDir );
install = f1.getCanonicalPath();
if( installSysProp != null )
System.getProperties().put( installSysProp,
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>