提交 63e48ae8 编写于 作者: K kohsuke

improved the diagnosability.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23882 71c3de6d-444a-0410-be80-ed276b4c234a
上级 b6600a3f
...@@ -1261,11 +1261,15 @@ public final class FilePath implements Serializable { ...@@ -1261,11 +1261,15 @@ public final class FilePath implements Serializable {
* Copies this file to the specified target. * Copies this file to the specified target.
*/ */
public void copyTo(FilePath target) throws IOException, InterruptedException { public void copyTo(FilePath target) throws IOException, InterruptedException {
OutputStream out = target.write();
try { try {
copyTo(out); OutputStream out = target.write();
} finally { try {
out.close(); copyTo(out);
} finally {
out.close();
}
} catch (IOException e) {
throw new IOException2("Failed to copy "+this+" to "+target,e);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册