mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
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:
1 parent
824cd27ac6
commit
577fa01c8f
1 file changed
+1
-24
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user