From e0634be24c2aebcdbfcf0c86247b7ccb4c128af4 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Wed, 3 Jan 2007 01:32:46 +0000 Subject: [PATCH] added a probe to investigate a failure at http://kohsuke.sfbay/hudson/job/jaxws-ri-unit-pre-jaxws21-optimistic/lastBuild/console git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1595 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/scm/CVSSCM.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/scm/CVSSCM.java b/core/src/main/java/hudson/scm/CVSSCM.java index fba9c693db..fed30b8435 100644 --- a/core/src/main/java/hudson/scm/CVSSCM.java +++ b/core/src/main/java/hudson/scm/CVSSCM.java @@ -210,7 +210,10 @@ public class CVSSCM extends AbstractCVSFamilySCM implements Serializable { if(!mf.isDirectory()) { // this module is just a file, say "foo/bar.txt". // to record "foo/CVS/*", we need to start by archiving "foo". - m = m.substring(0,m.lastIndexOf('/')); + int idx = m.lastIndexOf('/'); + if(idx==-1) + throw new Error("Kohsuke probe: m="+m); + m = m.substring(0, idx); mf = mf.getParentFile(); } archive(mf,m,zos);