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:
@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user