Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIEnvironmentCD.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIEnvironmentCD.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIEnvironmentCD.java
index b9905acb40b..36c1ff61a3e 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIEnvironmentCD.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSMIEnvironmentCD.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2006 Nokia and others.
+ * Copyright (c) 2006, 2010 Nokia 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Nokia - Initial API and implementation
+ * Marc-Andre Laperle - fix for bug 263689 (spaces in directory)
***********************************************************************/
package org.eclipse.cdt.debug.mi.core.command.factories.macos;
@@ -16,13 +17,15 @@ public class MacOSMIEnvironmentCD extends MIEnvironmentCD {
public MacOSMIEnvironmentCD(String miVersion, String path) {
super(miVersion, path);
- this.setOperation("cd");//$NON-NLS-1$
+ this.setOperation("-environment-cd");//$NON-NLS-1$
}
protected String parametersToString() {
String[] parameters = getParameters();
if (parameters != null && parameters.length == 1) {
- return '"' + parameters[0] + '"';
+ // To handle spaces in the path, the command string has this format:
+ // -environment-cd "\"/path with spaces\""
+ return "\"\\\"" + parameters[0] + "\\\"\""; //$NON-NLS-1$ //$NON-NLS-2$
}
return super.parametersToString();
}

Back to the top