Browse Source

bugzilla [45271]; process nonexistent resources with length mode=each

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@671299 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 17 years ago
parent
commit
66adfb896c
1 changed files with 5 additions and 6 deletions
  1. +5
    -6
      src/main/org/apache/tools/ant/taskdefs/Length.java

+ 5
- 6
src/main/org/apache/tools/ant/taskdefs/Length.java View File

@@ -225,13 +225,12 @@ public class Length extends Task implements Condition {
for (Iterator i = resources.iterator(); i.hasNext();) {
Resource r = (Resource) i.next();
if (!r.isExists()) {
log(r + " does not exist", Project.MSG_ERR);
} else if (r.isDirectory()) {
log(r + " is a directory; length unspecified",
Project.MSG_ERR);
} else {
h.handle(r);
log(r + " does not exist", Project.MSG_WARN);
}
if (r.isDirectory()) {
log(r + " is a directory; length may not be meaningful", Project.MSG_WARN);
}
h.handle(r);
}
h.complete();
}


Loading…
Cancel
Save