提交 98cf52b6 编写于 作者: J Jesse Glick

Slave.remoteFS is intended to be an absolute path.

(Could consider throwing IAE if it does not appear to be.
Cannot easily call getRootPath().absolutize() since that requires a connection.)
上级 63aba90d
......@@ -91,7 +91,7 @@ public abstract class Slave extends Node implements Serializable {
private final String description;
/**
* Path to the root of the workspace
* Absolute path to the root of the workspace
* from the view point of this node, such as "/hudson"
*/
protected final String remoteFS;
......@@ -412,6 +412,10 @@ public abstract class Slave extends Node implements Serializable {
if(value.startsWith("\\\\") || value.startsWith("/net/"))
return FormValidation.warning(Messages.Slave_Network_Mounted_File_System_Warning());
if (!value.startsWith("\\") && !value.startsWith("/")) {
return FormValidation.error(Messages.Slave_the_remote_root_must_be_an_absolute_path());
}
return FormValidation.ok();
}
}
......
......@@ -242,6 +242,7 @@ Slave.Launching={0} Launching slave agent
Slave.Network.Mounted.File.System.Warning=Are you sure you want to use network mounted file system for FS root? Note that this directory does not need to be visible to the master.
Slave.Remote.Director.Mandatory=Remote directory is mandatory
Slave.Terminated={0} slave agent was terminated
Slave.the_remote_root_must_be_an_absolute_path=The remote root must be an absolute path.
Slave.UnableToLaunch=Unable to launch the slave agent for {0}{1}
Slave.UnixSlave=This is a Unix slave
Slave.WindowsSlave=This is a Windows slave
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册