From fea1a3b57fd8c68f6240fced9055555637a94217 Mon Sep 17 00:00:00 2001 From: Kushal Munir < kmunir@ca.ibm.com> Date: Fri, 27 Oct 2006 22:43:23 +0000 Subject: [PATCH] Bug 160202 Remote shell dies --- .../subsystems/shells/ssh/SshServiceCommandShell.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java index e2a8cf68c8b..a3dc441fdb9 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java @@ -93,17 +93,24 @@ public class SshServiceCommandShell extends ServiceCommandShell implements ISyst gotCommand = true; } else { try { - parsedMsg = _patterns.matchLine(line); + + if ((_curCommand == null) || (!_curCommand.equals("ls"))) { + parsedMsg = _patterns.matchLine(line); + } } catch (Throwable e) { e.printStackTrace(); } } + RemoteOutput output = null; + String type = "stdout"; //$NON-NLS-1$ + if (parsedMsg != null) { type = parsedMsg.type; } + if (event.isError()) { output = new RemoteError(this, type); }