提交 c6486e2b 编写于 作者: J Jesse Glick

#1406 silently skipped the call to moveDirectory in case...

#1406 silently skipped the call to moveDirectory in case newBuildDir.isDirectory(), rather than throwing an IOE as renameTo does.
Also deleting apparently useless call to forceMkdir.
上级 589d74a5
......@@ -654,8 +654,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
File oldBuildDir = getBuildDir();
super.movedTo(destination, newItem, destDir);
File newBuildDir = getBuildDir();
if (oldBuildDir.isDirectory() && !newBuildDir.isDirectory()) {
FileUtils.forceMkdir(destDir.getParentFile());
if (oldBuildDir.isDirectory()) {
FileUtils.moveDirectory(oldBuildDir, newBuildDir);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册