mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 04:55:22 +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:
|
* Contributors:
|
||||||
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
||||||
* Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
|
* 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;
|
package org.eclipse.rse.dstore.universal.miners;
|
||||||
|
@ -42,33 +43,7 @@ public class UniversalServerUtilities {
|
||||||
*/
|
*/
|
||||||
public static String getUserPreferencesDirectory(DataStore dataStore)
|
public static String getUserPreferencesDirectory(DataStore dataStore)
|
||||||
{
|
{
|
||||||
String userPreferencesDirectory = dataStore.getClient().getProperty("user.home"); //$NON-NLS-1$
|
return dataStore.getUserPreferencesDirectory();
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue