mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-08 09:35:23 +02:00
don't allow dots in automatically created profile name
This commit is contained in:
parent
83f3fa750a
commit
5d070662b6
1 changed files with 8 additions and 3 deletions
|
@ -629,10 +629,15 @@ public class SystemProfileManager implements ISystemProfileManager
|
||||||
{
|
{
|
||||||
if (_profiles == null)
|
if (_profiles == null)
|
||||||
{
|
{
|
||||||
// FIXME
|
|
||||||
ISystemProfile profile = new SystemProfile();
|
ISystemProfile profile = new SystemProfile();
|
||||||
//profile.setName("Private");
|
String initProfileName = RSEUIPlugin.getLocalMachineName();
|
||||||
profile.setName(RSEUIPlugin.getLocalMachineName());
|
int dotIndex = initProfileName.indexOf('.');
|
||||||
|
|
||||||
|
if (dotIndex != -1)
|
||||||
|
{
|
||||||
|
initProfileName = initProfileName.substring(0, dotIndex);
|
||||||
|
}
|
||||||
|
profile.setName(initProfileName);
|
||||||
profile.setDefaultPrivate(true);
|
profile.setDefaultPrivate(true);
|
||||||
_profiles = new ArrayList();
|
_profiles = new ArrayList();
|
||||||
_profiles.add(profile);
|
_profiles.add(profile);
|
||||||
|
|
Loading…
Add table
Reference in a new issue