PATCH: java.util.zip.ZipInputStream.java

Carlos Valiente kaffe@rufus.w3.org
Sun, 6 May 2001 23:16:13 +0200



--------------Boundary-00=_13NXU8N5KZUSQKETXU4D
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

The jar utility from jdk 1.30. adds an entry for the directory META-INF, 
whose size and CRC is zero. kaffe's jar incorrectly barfs at this. I've 
attached a diff to solve this problem.

BTW, shouldn't kaffe's jar add entries for directories, like Sun's jars do?

Thank you for your work at Kaffe!


--------------Boundary-00=_13NXU8N5KZUSQKETXU4D
Content-Type: text/x-c++;
  charset="iso-8859-1";
  name="ZipInputStream.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="ZipInputStream.diff"

SW5kZXg6IFppcElucHV0U3RyZWFtLmphdmEKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2N2cy9rYWZm
ZS9rYWZmZS9saWJyYXJpZXMvamF2YWxpYi9qYXZhL3V0aWwvemlwL1ppcElucHV0U3RyZWFtLmph
dmEsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMTEKZGlmZiAtdSAtcjEuMTEgWmlwSW5wdXRTdHJl
YW0uamF2YQotLS0gWmlwSW5wdXRTdHJlYW0uamF2YQkyMDAwLzAyLzIzIDE4OjAxOjI1CTEuMTEK
KysrIFppcElucHV0U3RyZWFtLmphdmEJMjAwMS8wNS8wNiAyMToxNzozNwpAQCAtMTMzLDI0ICsx
MzMsMTcgQEAKIAogCSAgLy8gUmVhZCBDUkMKIAkgIGludCBkYXRhX2NyYyA9IGdldDMyKGRoZWFk
ZXIsIERBVEFfQ1JDKTsKLQkgIGlmIChkYXRhX2NyYyA9PSAwKSB7Ci0JICAgICAgdGhyb3cgbmV3
IElPRXhjZXB0aW9uKCJDUkMgb2YgMCBpcyBub3QgdmFsaWQgaW4gYSBEQVRBIGhlYWRlciIpOwot
CSAg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