[Kaffe] patch for ZipEntry.
Moses DeJong
dejong at cs.umn.edu
Fri Feb 12 21:36:46 PST 1999
Hello,
Could someone add this patch for the ZipEntry.java and ZipOutputStream.java
classes? It fixes the default (unknown) crc value for ZipEntry objects.
Index: ZipEntry.java
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/javalib/java/util/zip/ZipEntry.java,v
retrieving revision 1.4
diff -u -r1.4 ZipEntry.java
--- ZipEntry.java 1999/02/11 22:32:49 1.4
+++ ZipEntry.java 1999/02/13 06:33:23
@@ -44,7 +44,7 @@
}
name = nm;
time = -1;
- crc = 0;
+ crc = -1;
size = -1;
method = -1;
extra = null;
Index: ZipOutputStream.java
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/javalib/java/util/zip/ZipOutputStream.java,v
retrieving revision 1.2
diff -u -r1.2 ZipOutputStream.java
--- ZipOutputStream.java 1998/10/01 17:25:49 1.2
+++ ZipOutputStream.java 1999/02/13 06:33:23
@@ -119,7 +119,7 @@
if (curr.size != -1 && curr.size != in) {
throw new ZipException("uncompress size set incorrectly");
}
- if (curr.crc != 0 && curr.crc != crcval) {
+ if (curr.crc != -1 && curr.crc != crcval) {
throw new ZipException("crc set incorrectly");
}
@@ -201,7 +201,7 @@
throw new ZipException("size not set in stored entry");
}
ze.csize = ze.size;
- if (ze.crc == 0) {
+ if (ze.crc == -1) {
throw new ZipException("crc not set in stored entry");
}
}
thanks
Mo DeJong
dejong at cs.umn.edu
More information about the kaffe
mailing list