summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/tools
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-17 17:16:09 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-17 17:16:09 +0000
commit23fb041ecec1ac8bcba49bded8ef878d49352517 (patch)
treee1d396c25ba9cf40cab709f34a96a3d170387018 /libjava/classpath/tools
parentfd25a1d05fff30417b7821a77c0d034abc129baa (diff)
downloadppe42-gcc-23fb041ecec1ac8bcba49bded8ef878d49352517.tar.gz
ppe42-gcc-23fb041ecec1ac8bcba49bded8ef878d49352517.zip
PR libgcj/35950:
* tools/gnu/classpath/tools/jar/Entry.java: New version from Classpath. * tools/classes/gnu/classpath/tools/jar/Entry.class: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134402 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/tools')
-rw-r--r--libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.classbin634 -> 873 bytes
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jar/Entry.java18
2 files changed, 14 insertions, 4 deletions
diff --git a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class
index d030d92ddd8..b517df7439d 100644
--- a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class
+++ b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class
Binary files differ
diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/Entry.java b/libjava/classpath/tools/gnu/classpath/tools/jar/Entry.java
index aa8679aab55..b9108798a16 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());
}
+
}
OpenPOWER on IntegriCloud