Classpath developers,

The SableVM developers are moving to Classpath 0.06.  I will start
sending bug fixes found in Classpath.

The first one is in ZipFile.  See patch included.
The current Classpath implementation removes the path component
from the name when the JarFile is created with new ZipFile(new
File(name)).

Sun's JDK does not remove the path, getName() always return the name
specified in the constructor of ZipFile or File.

(Without this fix, it is impossible to load jar files with the
SystemClassLoader that are not located in the current directory).



David


---

David Bélanger
Graduate Student
School of Computer Science
McGill University
Office: MC226

Web page:   http://www.cs.mcgill.ca/~dbelan2/
Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt

Index: java/util/zip/ZipFile.java
===================================================================
--- java/util/zip/ZipFile.java  (revision 1011)
+++ java/util/zip/ZipFile.java  (revision 1075)
@@ -105,7 +105,7 @@
   public ZipFile(File file) throws ZipException, IOException
   {
     this.raf = new RandomAccessFile(file, "r");
-    this.name = file.getName();
+    this.name = file.getPath();
   }
 
   /**
@@ -134,7 +134,7 @@
          ("OPEN_DELETE mode not supported yet in java.util.zip.ZipFile");
       }
     this.raf = new RandomAccessFile(file, "r");
-    this.name = file.getName();
+    this.name = file.getPath();
   }
 
   /**
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to