1
0
Fork 0
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:
David McKnight 2006-05-24 14:09:04 +00:00
parent 83f3fa750a
commit 5d070662b6

View file

@ -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);