mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Fix PR 68176
* mi/org/eclipse/cdt/debug/mi/core/command/CygwinMIEnvironmentCD.java
This commit is contained in:
parent
70f786631a
commit
3fd15075c3
2 changed files with 21 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-06-22 Alain Magloire
|
||||||
|
|
||||||
|
Fix PR 68176
|
||||||
|
* mi/org/eclipse/cdt/debug/mi/core/command/CygwinMIEnvironmentCD.java
|
||||||
|
|
||||||
2004-06-09 Alain Magloire
|
2004-06-09 Alain Magloire
|
||||||
Fix for PR 66338
|
Fix for PR 66338
|
||||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
package org.eclipse.cdt.debug.mi.core.command;
|
package org.eclipse.cdt.debug.mi.core.command;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CommandLauncher;
|
import org.eclipse.cdt.core.CommandLauncher;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
|
@ -29,7 +30,7 @@ public class CygwinMIEnvironmentCD extends MIEnvironmentCD {
|
||||||
|
|
||||||
// Use the cygpath utility to convert the path
|
// Use the cygpath utility to convert the path
|
||||||
CommandLauncher launcher = new CommandLauncher();
|
CommandLauncher launcher = new CommandLauncher();
|
||||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
ByteArrayOutputStream err = new ByteArrayOutputStream();
|
ByteArrayOutputStream err = new ByteArrayOutputStream();
|
||||||
|
|
||||||
String newPath = null;
|
String newPath = null;
|
||||||
|
@ -38,14 +39,23 @@ public class CygwinMIEnvironmentCD extends MIEnvironmentCD {
|
||||||
new String[] { "-u", path }, //$NON-NLS-1$
|
new String[] { "-u", path }, //$NON-NLS-1$
|
||||||
new String[0],
|
new String[0],
|
||||||
new Path(".")); //$NON-NLS-1$
|
new Path(".")); //$NON-NLS-1$
|
||||||
if (launcher.waitAndRead(output, err) == CommandLauncher.OK) {
|
if (launcher.waitAndRead(out, err) == CommandLauncher.OK) {
|
||||||
newPath = output.toString().trim();
|
newPath = out.toString();
|
||||||
if (newPath != null && newPath.length() > 0) {
|
if (newPath != null) {
|
||||||
path = newPath;
|
newPath = newPath.trim();
|
||||||
|
if (newPath.length() > 0) {
|
||||||
|
path = newPath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
out.close();
|
||||||
|
err.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
// ignore.
|
||||||
|
}
|
||||||
|
|
||||||
setParameters(new String[]{newPath});
|
setParameters(new String[]{path});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue