Browse Source

repair the broken logic of my last patch (my fault not the original

submitter's).


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270110 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
e1ac74c48c
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      src/main/org/apache/tools/ant/taskdefs/Touch.java

+ 9
- 1
src/main/org/apache/tools/ant/taskdefs/Touch.java View File

@@ -180,7 +180,11 @@ public class Touch extends Task {
log("modification time of files cannot be set in JDK 1.1",
Project.MSG_WARN);
return;
} else {
}

boolean resetMillis = false;
if (millis < 0) {
resetMillis = true;
millis = System.currentTimeMillis();
}

@@ -205,6 +209,10 @@ public class Touch extends Task {
touch(new File(fromDir, srcDirs[j]));
}
}

if (resetMillis) {
millis = -1;
}
}

protected void touch(File file) throws BuildException {


Loading…
Cancel
Save