Repository: jclouds
Updated Branches:
  refs/heads/master f8025790b -> 61d0920f1


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.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/61d0920f
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/61d0920f
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/61d0920f

Branch: refs/heads/master
Commit: 61d0920f1983262e1b90710fad125cc4e63310ae
Parents: f802579
Author: mildis <[email protected]>
Authored: Thu Jan 5 09:16:24 2017 +0100
Committer: Zack Shoylev <[email protected]>
Committed: Tue Jan 10 13:11:33 2017 -0600

----------------------------------------------------------------------
 .../src/main/java/org/jclouds/filesystem/util/Utils.java           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/61d0920f/apis/filesystem/src/main/java/org/jclouds/filesystem/util/Utils.java
----------------------------------------------------------------------
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 6b7ec49..8119e98 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];
                      }
                   }
                }

Reply via email to