From 61d0920f1983262e1b90710fad125cc4e63310ae Mon Sep 17 00:00:00 2001 From: mildis Date: Thu, 5 Jan 2017 09:16:24 +0100 Subject: [PATCH] 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. --- .../src/main/java/org/jclouds/filesystem/util/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/util/Utils.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/util/Utils.java index 6b7ec492c7..8119e98306 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/util/Utils.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/util/Utils.java @@ -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]; } } }