Like some previous patches we posted, File.getCanonicalPath hasn't 
counted in windows style path name like "drive:\dir\dir\file".
A patch is like this:

public String
getCanonicalPath() throws IOException
{
  String abspath = getAbsolutePath();
-  StringBuffer canonpath = new StringBuffer(separator);
+ //You have to deal with the chaos of naming of windows style path
+ if( System.getProperty("os.name").indexOf("Windows") >= 0 )
+      abspath = abspath.replace('/', separatorChar);
+ StringBuffer canonpath;
+ if( abspath.startsWith(separator) ) //no drive prefix
+      canonpath = new StringBuffer(separator);
+ else
+      canonpath = new StringBuffer();  
   StringTokenizer st = new StringTokenizer(abspath, separator);
  ... ...
}

Of course it depends on File.getAbsolutePath to correctly handle such 
class of path names first.

_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to