mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 301706: Mac OS: Debugger can not handle file paths with spaces.
This commit is contained in:
parent
687fffa793
commit
d81756f82e
1 changed files with 6 additions and 3 deletions
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Nokia - Initial API and implementation
|
* 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;
|
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) {
|
public MacOSMIEnvironmentCD(String miVersion, String path) {
|
||||||
super(miVersion, path);
|
super(miVersion, path);
|
||||||
this.setOperation("cd");//$NON-NLS-1$
|
this.setOperation("-environment-cd");//$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String parametersToString() {
|
protected String parametersToString() {
|
||||||
String[] parameters = getParameters();
|
String[] parameters = getParameters();
|
||||||
if (parameters != null && parameters.length == 1) {
|
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();
|
return super.parametersToString();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue