Browse Source

exclude directories for signed selection

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277074 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
9ba8549bfd
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      src/main/org/apache/tools/ant/types/selectors/SignedSelector.java

+ 6
- 3
src/main/org/apache/tools/ant/types/selectors/SignedSelector.java View File

@@ -41,12 +41,15 @@ public class SignedSelector extends DataType implements FileSelector {
* The heart of the matter. This is where the selector gets to decide * The heart of the matter. This is where the selector gets to decide
* on the inclusion of a file in a particular fileset. * 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 * @return whether the file should be selected or not
*/ */
public boolean isSelected(File basedir, String filename, File file) { public boolean isSelected(File basedir, String filename, File file) {
if (file.isDirectory()) {
return false; // Quick return: directories cannot be signed
}
isSigned.setProject(getProject()); isSigned.setProject(getProject());
isSigned.setFile(file); isSigned.setFile(file);
return isSigned.eval(); return isSigned.eval();


Loading…
Cancel
Save