diff --git a/changelog.html b/changelog.html index 5ca84606e786dd0e6459956d6c9e37185a08b521..31a65f5f6cc33d35cfc2c954eee754b76d5ac8b7 100644 --- a/changelog.html +++ b/changelog.html @@ -61,6 +61,9 @@ Upcoming changes
  • Fixed NPE in running assembly:assembly with Maven3 (issue 8837) +
  • + Fixed a bug in one of the file copy operations that caused the copy-artifact plugin to fail to preserve the timestamp. + (issue 10805) diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index 6c95fc94359696dcbb91ed3de180507d7523cb4d..6467a16924f014dab9e09d98d873e6d5cdaedc08 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -1392,13 +1392,14 @@ public final class FilePath implements Serializable { } /** - * Copies this file to the specified target, with file permissions intact. + * Copies this file to the specified target, with file permissions and other meta attributes intact. * @since 1.311 */ public void copyToWithPermission(FilePath target) throws IOException, InterruptedException { copyTo(target); // copy file permission target.chmod(mode()); + target.touch(lastModified()); } /**