Need to trim trailing newline from the indirect command line string

This commit is contained in:
Tor Lillqvist 2012-01-11 14:18:20 +02:00
parent 51a5998433
commit 3267d34fb9

View file

@ -120,7 +120,7 @@ public class Bootstrap extends NativeActivity
if (indirectFile != null) {
try {
// Somewhat stupid but short way to read a file into a string
cmdLine = new Scanner(new File(indirectFile), "UTF-8").useDelimiter("\\A").next();
cmdLine = new Scanner(new File(indirectFile), "UTF-8").useDelimiter("\\A").next().trim();
}
catch (java.io.FileNotFoundException e) {
Log.i(TAG, String.format("Could not read %s: %s",indirectFile, e.toString()));