diff options
author | Tom Tromey <tromey@redhat.com> | 2008-04-17 17:16:09 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2008-04-17 17:16:09 +0000 |
commit | 6afce8909c4c8e04169364b92742d9ccc202410d (patch) | |
tree | e1d396c25ba9cf40cab709f34a96a3d170387018 | |
parent | 46225e2688bbe10bee867517803ad860b371e0e5 (diff) | |
download | gcc-6afce8909c4c8e04169364b92742d9ccc202410d.zip gcc-6afce8909c4c8e04169364b92742d9ccc202410d.tar.gz gcc-6afce8909c4c8e04169364b92742d9ccc202410d.tar.bz2 |
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
-rw-r--r-- | libjava/classpath/ChangeLog.gcj | 7 | ||||
-rw-r--r-- | libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class | bin | 634 -> 873 bytes | |||
-rw-r--r-- | libjava/classpath/tools/gnu/classpath/tools/jar/Entry.java | 18 |
3 files changed, 21 insertions, 4 deletions
diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj index ffc3571..093b2fb 100644 --- a/libjava/classpath/ChangeLog.gcj +++ b/libjava/classpath/ChangeLog.gcj @@ -1,3 +1,10 @@ +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 diff --git a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class Binary files differindex d030d92..b517df7 100644 --- a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class +++ b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/Entry.java b/libjava/classpath/tools/gnu/classpath/tools/jar/Entry.java index aa8679a..b910879 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jar/Entry.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jar/Entry.java @@ -1,5 +1,5 @@ /* 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()); } + } |