simplified.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3958 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-07-31 04:55:46 +00:00
1 parent 824cd27ac6
commit 577fa01c8f
1 file changed
+1 -24
+1 -24
View File
@@ -882,30 +882,7 @@ public class CVSSCM extends SCM implements Serializable {
* Checks if cvs executable exists.
*/
public void doCvsExeCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
// this method can be used to check if a file exists anywhere in the file system,
// so it should be protected.
new FormFieldValidator(req,rsp,true) {
protected void check() throws IOException, ServletException {
String cvsExe = fixEmpty(request.getParameter("value"));
if(cvsExe==null) {
ok();
return;
}
if(cvsExe.indexOf(File.separatorChar)>=0) {
// this is full path
if(new File(cvsExe).exists()) {
ok();
} else {
error("There's no such file: "+cvsExe);
}
} else {
// can't really check
ok();
}
}
}.process();
new FormFieldValidator.Executable(req,rsp).process();
}
/**