提交 b06e2aa3 编写于 作者: D Daniel Beck

[FIXED JENKINS-23683] Check whether war's directory is writable

上级 264bd1a2
......@@ -158,7 +158,14 @@ public abstract class Lifecycle implements ExtensionPoint {
public boolean canRewriteHudsonWar() {
// if we don't know where jenkins.war is, it's impossible to replace.
File f = getHudsonWar();
return f!=null && f.canWrite();
if (f == null || !f.canWrite()) {
return false;
}
File parent = f.getParentFile();
if (parent == null || !parent.canWrite()) {
return false;
}
return true;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册