Browse Source

if either resource to be compared has an unknown size, we must compare content

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@536536 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 18 years ago
parent
commit
08f27b19f2
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      src/main/org/apache/tools/ant/util/ResourceUtils.java

+ 7
- 2
src/main/org/apache/tools/ant/util/ResourceUtils.java View File

@@ -438,8 +438,13 @@ public class ResourceUtils {
if (r1.equals(r2)) {
return true;
}
if (!text && r1.getSize() != r2.getSize()) {
return false;
if (!text) {
long s1 = r1.getSize();
long s2 = r2.getSize();
if (s1 != Resource.UNKNOWN_SIZE && s2 != Resource.UNKNOWN_SIZE
&& s1 != s2) {
return false;
}
}
return compareContent(r1, r2, text) == 0;
}


Loading…
Cancel
Save