mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 09:15:38 +02:00
[dstore] leading file.searator in DSTORE_LOG_DIRECTORY not handled
This commit is contained in:
parent
d9d7cb5c02
commit
b3eb79726a
1 changed files with 12 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2010 IBM Corporation and others.
|
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
* David McKnight (IBM) - [289891] [dstore] StringIndexOutOfBoundsException in getUserPreferencesDirectory when DSTORE_LOG_DIRECTORY is ""
|
* David McKnight (IBM) - [289891] [dstore] StringIndexOutOfBoundsException in getUserPreferencesDirectory when DSTORE_LOG_DIRECTORY is ""
|
||||||
* David McKnight (IBM) - [294933] [dstore] RSE goes into loop
|
* David McKnight (IBM) - [294933] [dstore] RSE goes into loop
|
||||||
* David McKnight (IBM) - [331922] [dstore] enable DataElement recycling
|
* David McKnight (IBM) - [331922] [dstore] enable DataElement recycling
|
||||||
|
* David McKnight (IBM) - [336257] [dstore] leading file.searator in DSTORE_LOG_DIRECTORY not handled
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.core.model;
|
package org.eclipse.dstore.core.model;
|
||||||
|
@ -3611,14 +3612,22 @@ public final class DataStore
|
||||||
if (logDirectory == null){
|
if (logDirectory == null){
|
||||||
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
|
|
||||||
if (logDirectory.length() > 0){
|
if (logDirectory.length() > 0){
|
||||||
|
// append a '/' if not there
|
||||||
if (logDirectory.charAt( logDirectory.length() -1 ) != File.separatorChar ) {
|
if (logDirectory.charAt( logDirectory.length() -1 ) != File.separatorChar ) {
|
||||||
logDirectory = logDirectory + File.separator;
|
logDirectory = logDirectory + File.separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove the '/' if first char
|
||||||
|
if (logDirectory.charAt(0) == File.separatorChar){
|
||||||
|
logDirectory = logDirectory.substring(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_userPreferencesDirectory = _userPreferencesDirectory + logDirectory + clientUserID;
|
_userPreferencesDirectory = _userPreferencesDirectory + logDirectory + clientUserID;
|
||||||
|
System.out.println("pref dir ="+_userPreferencesDirectory);
|
||||||
|
System.out.println("log dir="+logDirectory);
|
||||||
|
|
||||||
File dirFile = new File(_userPreferencesDirectory);
|
File dirFile = new File(_userPreferencesDirectory);
|
||||||
if (!dirFile.exists()) {
|
if (!dirFile.exists()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue