1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

Bug 160202: Remote shell dies.

This commit is contained in:
Kushal Munir 2006-10-27 23:04:58 +00:00
parent fea1a3b57f
commit 968b81c454

View file

@ -17,6 +17,7 @@
package org.eclipse.rse.subsystems.shells.ssh;
import java.util.ArrayList;
import java.util.StringTokenizer;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@ -94,8 +95,26 @@ public class SshServiceCommandShell extends ServiceCommandShell implements ISyst
} else {
try {
if ((_curCommand == null) || (!_curCommand.equals("ls"))) {
// Bug 160202: Remote shell dies.
if ((_curCommand == null) || (!_curCommand.trim().equals("ls"))) {
parsedMsg = _patterns.matchLine(line);
// Bug 160202: Remote shell dies.
if (_curCommand != null) {
String temp = _curCommand.trim();
StringTokenizer tokenizer = new StringTokenizer(temp);
if (tokenizer.countTokens() == 2) {
String token1 = tokenizer.nextToken();
String token2 = tokenizer.nextToken();
if ((token1.equals("ls")) && (token2.indexOf('-') == 0) && (token2.indexOf('l') > 0)) {
if (line.startsWith("total")) {
parsedMsg = null;
}
}
}
}
}
}
catch (Throwable e) {