bodewig 2003/07/03 08:00:36
Modified: src/main/org/apache/tools/zip ZipEntry.java
Log:
Need to override isDirectory for situations where setName has been called
Revision Changes Path
1.10 +17 -1 ant/src/main/org/apache/tools/zip/ZipEntry.java
Index: ZipEntry.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ZipEntry.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ZipEntry.java 2 Jul 2003 14:36:14 -0000 1.9
+++ ZipEntry.java 3 Jul 2003 15:00:36 -0000 1.10
@@ -234,6 +234,15 @@
}
/**
+ * Unix permission.
+ *
+ * @since Ant 1.6
+ */
+ public int getUnixMode() {
+ return (int) ((getExternalAttributes() >> 16) & 0xFFFF);
+ }
+
+ /**
* Platform specification to put into the "version made
* by" part of the central file header.
*
@@ -402,6 +411,13 @@
*/
public String getName() {
return name == null ? super.getName() : name;
+ }
+
+ /**
+ * @since 1.10
+ */
+ public boolean isDirectory() {
+ return getName().endsWith("/");
}
protected void setName(String name) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]