[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
Fix - OutofBounds error under unix
- To: jCVS Maililing list <jcvs@career.gjt.org>
- Subject: Fix - OutofBounds error under unix
- From: Andre-John Mas <ama@act.qc.ca>
- Date: Fri, 30 Jul 1999 14:57:44 -0400
When a local file was deleted, and jCVS was run to update the missing
file jCVS would work under Windows but cause a
StringIndexOutOfBoundsException
under unix. A bit of testing showed that it was the
index = localPath.lastIndexOf( '/' )
line in CVSProject.ensureLocalTree that was causing the problem. Below
is
the fix that I have used in my local copy:
if ( System.getProperty("os.name").indexOf("Windows") != -1 ) {
index = localPath.lastIndexOf( '/' );
else {
index = localPath.lastIndexOf( '\\' );
}
I have no idea whether this would have to be also adapted on the Mac,
but
it works for Unix and Windows.
Andre