Author: bodewig
Date: Sun Aug 23 06:02:22 2009
New Revision: 806932

URL: http://svn.apache.org/viewvc?rev=806932&view=rev
Log:
If only permissions have been specified, don't compare the dir/file/link flag 
part

Modified:
    
ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java

Modified: 
ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java
URL: 
http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java?rev=806932&r1=806931&r2=806932&view=diff
==============================================================================
--- 
ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java
 (original)
+++ 
ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java
 Sun Aug 23 06:02:22 2009
@@ -23,6 +23,7 @@
 import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.taskdefs.condition.Condition;
 import org.apache.tools.ant.types.resources.ArchiveResource;
+import org.apache.tools.zip.UnixStat;
 
 /**
  * Tests the mode of an archive entry.
@@ -54,6 +55,9 @@
     public boolean eval() throws BuildException {
         validate();
         int actual = resource.getMode();
+        if (mode <= UnixStat.PERM_MASK) {
+            actual &= UnixStat.PERM_MASK;
+        }
         log("expected: " + mode + ", actual: " + actual, Project.MSG_VERBOSE);
         return mode == actual;
     }


Reply via email to