Skip to content
Permalink
Browse files

[FIXED JENKINS-10805] preserve the timestampa as well as permissions

  • Loading branch information...
kohsuke committed Aug 24, 2011
1 parent 4f3a285 commit 552741c9800d0c990e04c4905ed8b0e9d31690e4
Showing with 5 additions and 1 deletion.
  1. +3 −0 changelog.html
  2. +2 −1 core/src/main/java/hudson/FilePath.java
@@ -61,6 +61,9 @@
<li class=bug>
Fixed NPE in running <tt>assembly:assembly</tt> with Maven3
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-8837">issue 8837</a>)
<li class=bug>
Fixed a bug in one of the file copy operations that caused the copy-artifact plugin to fail to preserve the timestamp.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10805">issue 10805</a>)
</ul>
</div><!--=TRUNK-END=-->

@@ -1392,13 +1392,14 @@ public void copyTo(FilePath target) throws IOException, InterruptedException {
}

/**
* 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());
}

/**

0 comments on commit 552741c

Please sign in to comment.
You can’t perform that action at this time.