Commit 6afce890 by Tom Tromey Committed by Tom Tromey

re PR libgcj/35950 (jar produces files ecj won't handle)

	PR libgcj/35950:
	* tools/gnu/classpath/tools/jar/Entry.java: New version from
	Classpath.
	* tools/classes/gnu/classpath/tools/jar/Entry.class: Update.

From-SVN: r134402
parent 46225e26
2008-04-17 Tom Tromey <tromey@redhat.com>
PR libgcj/35950:
* tools/gnu/classpath/tools/jar/Entry.java: New version from
Classpath.
* tools/classes/gnu/classpath/tools/jar/Entry.class: Update.
2008-03-02 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
......
/* Entry.java - represent a single file to write to a jar
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -49,12 +49,22 @@ public class Entry
public Entry(File file, String name)
{
this.file = file;
this.name = name;
/* Removes any './' prefixes automatically. Those caused trouble
* in (boot) classpath use-cases. See #32516.
*/
int start = 0;
while (name.length() > start + 2
&& name.codePointAt(start) == '.'
&& name.codePointAt(start + 1) == File.separatorChar)
start += 2;
this.name = name.substring(start);
}
public Entry(File file)
{
this.file = file;
this.name = file.toString();
this(file, file.toString());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment