[kaffe] Buglet in Jar for -C

Mark Wielaard mark at klomp.org
Sat Aug 14 13:33:45 PDT 2004


Hi,

When building gcjwebplugin and using kaffe jar I noticed that when -C
was used the first directory name was always stripped of files in
subdirectories of the directory of the -C argument.

The following patch fixes it. This should be an if-else since in the if
branch tmp is made absolute so if the first if statement succeeds the
second if statement also (erronously) succeeds.

Cheers,

Mark

	* libraries/javalib/kaffe/tools/jar/Jar.java
	(createFileLookupTable): Don't double check File.isAbsolute().

--- libraries/javalib/kaffe/tools/jar/Jar.java  27 Apr 2004 18:25:19
-0000     1.6
+++ libraries/javalib/kaffe/tools/jar/Jar.java  14 Aug 2004 20:33:07
-0000
@@ -494,9 +494,7 @@

            if (! tmp.isAbsolute()) {
                tmp = new XPFile(parent,files[i]);
-           }
-
-           if (tmp.isAbsolute()) {
+           } else {
                // Find and remove the first '/' in the short name
                String name = files[i];
                int index = name.indexOf('/');

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://pogo.kaffe.org/pipermail/kaffe/attachments/20040814/24dd22ab/attachment.bin


More information about the kaffe mailing list