aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2015-06-23 07:06:33 -0700
committerRoman Birg <roman@cyngn.com>2015-07-31 11:53:00 -0700
commite193f8c63b212cc0e1bc788d8293b772ad8bf8f0 (patch)
tree85d69d31b2142bf14305a1c9d8363d5ea467701e
parent51e369a4013e0150b894aef57312bf3c387510fe (diff)
downloadandroid_packages_apps_CMFileManager-e193f8c63b212cc0e1bc788d8293b772ad8bf8f0.tar.gz
android_packages_apps_CMFileManager-e193f8c63b212cc0e1bc788d8293b772ad8bf8f0.tar.bz2
android_packages_apps_CMFileManager-e193f8c63b212cc0e1bc788d8293b772ad8bf8f0.zip
Shell console: fix bug in shell output stream
The command is finished and the partial result may also have the command exit code. When the partial stream does have the exit code, we were writing *only* the contents of the exit code, but we need to write everything *until* the exit code, keeping the contents intact. Ref: QRDL-950 Change-Id: I5e7af1125270c394f42fe7661cbefdd98c6a6052 Signed-off-by: Roman Birg <roman@cyngn.com>
-rw-r--r--src/com/cyanogenmod/filemanager/console/shell/ShellConsole.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/filemanager/console/shell/ShellConsole.java b/src/com/cyanogenmod/filemanager/console/shell/ShellConsole.java
index 00a65be6..1ecdc82b 100644
--- a/src/com/cyanogenmod/filemanager/console/shell/ShellConsole.java
+++ b/src/com/cyanogenmod/filemanager/console/shell/ShellConsole.java
@@ -1236,7 +1236,7 @@ public abstract class ShellConsole extends Console implements Program.ProgramLis
if (match != null) {
partial.reset();
- partial.write(bytes, match[0], match[1]);
+ partial.write(bytes, 0, match[0]);
}
}
return ret;