ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/types/selectors SignedSelector.java
Date Tue, 23 Nov 2004 11:15:20 GMT
peterreilly    2004/11/23 03:15:20

  Modified:    src/main/org/apache/tools/ant/types/selectors
                        SignedSelector.java
  Log:
  exclude directories for signed selection
  
  Revision  Changes    Path
  1.3       +6 -3      ant/src/main/org/apache/tools/ant/types/selectors/SignedSelector.java
  
  Index: SignedSelector.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/selectors/SignedSelector.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SignedSelector.java	22 Nov 2004 10:48:57 -0000	1.2
  +++ SignedSelector.java	23 Nov 2004 11:15:20 -0000	1.3
  @@ -41,12 +41,15 @@
        * The heart of the matter. This is where the selector gets to decide
        * on the inclusion of a file in a particular fileset.
        *
  -     * @param basedir the base directory the scan is being done from
  -     * @param filename is the name of the file to check
  -     * @param file is a java.io.File object the selector can use
  +     * @param basedir not used by this selector
  +     * @param filename not used by this selector
  +     * @param file     path to file to be selected
        * @return whether the file should be selected or not
        */
       public boolean isSelected(File basedir, String filename, File file) {
  +        if (file.isDirectory()) {
  +            return false; // Quick return: directories cannot be signed
  +        }
           isSigned.setProject(getProject());
           isSigned.setFile(file);
           return isSigned.eval();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message