mirror of https://github.com/apache/jclouds.git
WindowsEveryonePrincipal : update regex for FR
"Everyone" in a french Windows is "Tout le monde". Thus, the line.split(" ") returns only "Tout" and putBlob() throws an exception. The modified regex search for the first two consecutive white char to return the name. Windows's whoami returns a bunch of 0x20 between the name and the type.
This commit is contained in:
parent
f8025790bf
commit
61d0920f19
|
@ -113,7 +113,7 @@ public class Utils {
|
|||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()))) {
|
||||
while ((line = reader.readLine()) != null) {
|
||||
if (line.indexOf("S-1-1-0") != -1) {
|
||||
return line.split(" ")[0];
|
||||
return line.split("\\s{2,}")[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue