Browse Source

log a warning message if File#setLastModified fails. PR 49485

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@957442 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 15 years ago
parent
commit
2f588f517b
2 changed files with 8 additions and 1 deletions
  1. +5
    -0
      WHATSNEW
  2. +3
    -1
      src/main/org/apache/tools/ant/types/resources/FileResource.java

+ 5
- 0
WHATSNEW View File

@@ -112,6 +112,11 @@ Other changes:
scenarios where a given extension-point may or may not exist.
Bugzilla Report 49473.

* Ant now logs a warning message if it fails to change the file
modification time in for example when using <touch> or preserving
timestamps in various tasks.
Bugzilla Report 49485.

Changes from Ant 1.8.0 TO Ant 1.8.1
===================================



+ 3
- 1
src/main/org/apache/tools/ant/types/resources/FileResource.java View File

@@ -345,7 +345,9 @@ public class FileResource extends Resource implements Touchable, FileProvider,
((FileResource) getCheckedRef()).touch(modTime);
return;
}
getNotNullFile().setLastModified(modTime);
if (!getNotNullFile().setLastModified(modTime)) {
log("Failed to change file modification time", Project.MSG_WARN);
}
}

/**


Loading…
Cancel
Save