1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Windows: reg query uses different separators on xp, fooling parser. Fixed

This commit is contained in:
Federico Fissore
2015-06-04 11:44:56 +02:00
parent 3c982759c2
commit e9d66015a4
2 changed files with 16 additions and 3 deletions

View File

@ -15,16 +15,16 @@ public class RegQueryParser {
}
private void parse(String regQueryOutput) {
List<String> rows = Arrays.asList(regQueryOutput.replace("\r", "\n").replace("\n\n", "\n").split("\n"));
List<String> rows = Arrays.asList(regQueryOutput.replace(" ", "\t").replace("\r", "\n").replace("\n\n", "\n").split("\n"));
String row = Iterables.find(rows, new Predicate<String>() {
@Override
public boolean apply(String input) {
return input.startsWith(" ");
return input.startsWith("\t");
}
});
String[] cols = row.split(" ");
String[] cols = row.split("\t");
assert cols.length == 4;
this.valueOfKey = cols[3];
}