1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 04:25:21 +02:00

[dstore] StringIndexOutOfBoundsException in getUserPreferencesDirectory when DSTORE_LOG_DIRECTORY is ""

This commit is contained in:
David McKnight 2009-09-18 19:59:04 +00:00
parent d8df1615cd
commit 9fcb91e8f6

View file

@ -31,6 +31,7 @@
* David McKnight (IBM) - [285151] [dstore] Potential threading problem in DataStore (open call) * David McKnight (IBM) - [285151] [dstore] Potential threading problem in DataStore (open call)
* David McKnight (IBM) - [285301] [dstore] 100% CPU if user does not have write access to $HOME * David McKnight (IBM) - [285301] [dstore] 100% CPU if user does not have write access to $HOME
* David McKnight (IBM) - [287457] [dstore] problems with disconnect when readonly trace file * David McKnight (IBM) - [287457] [dstore] problems with disconnect when readonly trace file
* David McKnight (IBM) - [289891] [dstore] StringIndexOutOfBoundsException in getUserPreferencesDirectory when DSTORE_LOG_DIRECTORY is ""
*******************************************************************************/ *******************************************************************************/
package org.eclipse.dstore.core.model; package org.eclipse.dstore.core.model;
@ -3590,8 +3591,10 @@ public final class DataStore
logDirectory = ".eclipse" + File.separator + "RSE" + File.separator; //$NON-NLS-1$//$NON-NLS-2$ logDirectory = ".eclipse" + File.separator + "RSE" + File.separator; //$NON-NLS-1$//$NON-NLS-2$
} }
// append a '/' if not there // append a '/' if not there
if (logDirectory.charAt( logDirectory.length() -1 ) != File.separatorChar ) { if (logDirectory.length() > 0){
logDirectory = logDirectory + File.separator; if (logDirectory.charAt( logDirectory.length() -1 ) != File.separatorChar ) {
logDirectory = logDirectory + File.separator;
}
} }
_userPreferencesDirectory = _userPreferencesDirectory + logDirectory + clientUserID; _userPreferencesDirectory = _userPreferencesDirectory + logDirectory + clientUserID;