diff --git a/WHATSNEW b/WHATSNEW index feb4cf5c2..faceefe31 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -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 or preserving + timestamps in various tasks. + Bugzilla Report 49485. + Changes from Ant 1.8.0 TO Ant 1.8.1 =================================== diff --git a/src/main/org/apache/tools/ant/types/resources/FileResource.java b/src/main/org/apache/tools/ant/types/resources/FileResource.java index 5e37204b2..fb475027d 100644 --- a/src/main/org/apache/tools/ant/types/resources/FileResource.java +++ b/src/main/org/apache/tools/ant/types/resources/FileResource.java @@ -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); + } } /**