mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 15:15:25 +02:00
[239068] [multithread] "client.username" property must be set via dataStore Client
This commit is contained in:
parent
91559f101d
commit
44be46e438
1 changed files with 2 additions and 27 deletions
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
||||
* Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
|
||||
* Noriaki Takatsu (IBM) - [239068] [multithread] "client.username" property must be set via dataStore Client
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.dstore.universal.miners;
|
||||
|
@ -42,33 +43,7 @@ public class UniversalServerUtilities {
|
|||
*/
|
||||
public static String getUserPreferencesDirectory(DataStore dataStore)
|
||||
{
|
||||
String userPreferencesDirectory = dataStore.getClient().getProperty("user.home"); //$NON-NLS-1$
|
||||
|
||||
String clientUserID = System.getProperty("client.username"); //$NON-NLS-1$
|
||||
if (clientUserID == null || clientUserID.equals("")) //$NON-NLS-1$
|
||||
{
|
||||
clientUserID = ""; //$NON-NLS-1$
|
||||
}
|
||||
else
|
||||
{
|
||||
clientUserID += File.separator;
|
||||
}
|
||||
|
||||
// append a '/' if not there
|
||||
if ( userPreferencesDirectory.length() == 0 ||
|
||||
userPreferencesDirectory.charAt( userPreferencesDirectory.length() -1 ) != File.separatorChar ) {
|
||||
|
||||
userPreferencesDirectory = userPreferencesDirectory + File.separator;
|
||||
}
|
||||
|
||||
userPreferencesDirectory = userPreferencesDirectory + ".eclipse" + File.separator + //$NON-NLS-1$
|
||||
"RSE" + File.separator + clientUserID; //$NON-NLS-1$
|
||||
File dirFile = new File(userPreferencesDirectory);
|
||||
if (!dirFile.exists()) {
|
||||
dirFile.mkdirs();
|
||||
}
|
||||
|
||||
return userPreferencesDirectory;
|
||||
return dataStore.getUserPreferencesDirectory();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue