mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
[246592] Fixed initialization of fields in LaunchTerminalCommandHandler.
This commit is contained in:
parent
66c5f45a7d
commit
0ac39af559
2 changed files with 11 additions and 2 deletions
|
@ -100,6 +100,11 @@ public class LaunchTerminalCommandHandler extends AbstractHandler {
|
|||
private void init(IStructuredSelection selection) {
|
||||
Iterator e = selection.iterator();
|
||||
Object selectedObject = e.next();
|
||||
|
||||
selected = null;
|
||||
subSystem = null;
|
||||
selectedFilterRef = null;
|
||||
|
||||
if (selectedObject != null) {
|
||||
if (selectedObject instanceof ISystemFilterReference) {
|
||||
selectedFilterRef = (ISystemFilterReference) selectedObject;
|
||||
|
@ -145,9 +150,12 @@ public class LaunchTerminalCommandHandler extends AbstractHandler {
|
|||
return null;
|
||||
String path = getWorkingDirectory(selected);
|
||||
|
||||
String cdCmd = "cd " + PathUtility.enQuoteUnix(path); //$NON-NLS-1$
|
||||
String cdCmd;
|
||||
if (getTerminalSubSystem().getHost().getSystemType().isWindows()) {
|
||||
cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
|
||||
} else
|
||||
{
|
||||
cdCmd = "cd " + PathUtility.enQuoteUnix(path); //$NON-NLS-1$
|
||||
}
|
||||
return cdCmd + "\r"; //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* Contributors:
|
||||
* Anna Dushistova (MontaVista) - initial API and implementation
|
||||
* Anna Dushistova (MontaVista) - [228577] [rseterminal] Clean up RSE Terminal impl
|
||||
* Anna Dushistova (MontaVista) - [246592] Terminal session issues "cd /
|
||||
********************************************************************************/
|
||||
package org.eclipse.rse.internal.terminals.ui.views;
|
||||
|
||||
|
@ -51,7 +52,7 @@ public class RSETerminalConnectionThread extends Thread {
|
|||
try {
|
||||
if (subsystem instanceof TerminalServiceSubSystem) {
|
||||
ITerminalService ts = ((TerminalServiceSubSystem) subsystem).getTerminalService();
|
||||
shell = ts.launchTerminal("ansi", null, null, "/", null, new NullProgressMonitor());
|
||||
shell = ts.launchTerminal("ansi", null, null, null, null, new NullProgressMonitor());
|
||||
}
|
||||
fConn.setInputStream(shell.getInputStream());
|
||||
fConn.setOutputStream(shell.getOutputStream());
|
||||
|
|
Loading…
Add table
Reference in a new issue