diff options
-rw-r--r-- | org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java index 3f6e6ae38..11344dde6 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -181,8 +181,9 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig * @since 3.5 */ protected static String getSimpleName(String fileName) { - if (fileName.endsWith(ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION)) { - return fileName.substring(0, fileName.length() - ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION.length() - 1); + IPath path = new Path(fileName); + if(ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION.equals(path.getFileExtension())) { + return path.removeFileExtension().toString(); } return fileName; } |