From: David Belanger Date: Wed, 26 Nov 2003 21:55:27 +0000 (+0000) Subject: ZipFile (Zipfile(File)): Set file path as name. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=03e524201551de39342d9275010e91e9891f2314;p=gcc.git ZipFile (Zipfile(File)): Set file path as name. 2003-11-26 David Belanger * java/util/zip/ZipFile (Zipfile(File)): Set file path as name. (ZipFile(File,int)): Likewise. From-SVN: r73965 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 260c7ce12d6..bf2ffaeed69 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-11-26 David Belanger + + * java/util/zip/ZipFile (Zipfile(File)): Set file path as name. + (ZipFile(File,int)): Likewise. + 2003-11-26 Stuart Ballard * java/util/HashMap.java (putAll): Use Iterator hasNext() method. diff --git a/libjava/java/util/zip/ZipFile.java b/libjava/java/util/zip/ZipFile.java index b6bc5414d08..50f489fdb5b 100644 --- a/libjava/java/util/zip/ZipFile.java +++ b/libjava/java/util/zip/ZipFile.java @@ -105,7 +105,7 @@ public class ZipFile implements ZipConstants public ZipFile(File file) throws ZipException, IOException { this.raf = new RandomAccessFile(file, "r"); - this.name = file.getName(); + this.name = file.getPath(); } /** @@ -134,7 +134,7 @@ public class ZipFile implements ZipConstants ("OPEN_DELETE mode not supported yet in java.util.zip.ZipFile"); } this.raf = new RandomAccessFile(file, "r"); - this.name = file.getName(); + this.name = file.getPath(); } /** @@ -438,7 +438,7 @@ public class ZipFile implements ZipConstants } /** - * Returns the name of this zip file. + * Returns the (path) name of this zip file. */ public String getName() {