Merge pull request #1109 from adbre/iss358
authorAlex Rønne Petersen <alex@lycus.org>
Thu, 19 Jun 2014 00:34:53 +0000 (02:34 +0200)
committerAlex Rønne Petersen <alex@lycus.org>
Thu, 19 Jun 2014 00:34:53 +0000 (02:34 +0200)
Override registry storage with MONO_CURRENTUSER_REGISTRY_PATH

mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs

index 1cb4c39eacd0546b35dd423a20445001b4c3542a..4d4847a9713957c7193a2a83d68fee4fc02b2ac1 100644 (file)
@@ -771,9 +771,13 @@ namespace Microsoft.Win32 {
 
                private static string UserStore {
                        get {
-                               if (user_store == null)
-                                       user_store = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal),
-                                       ".mono/registry");
+                               if (user_store == null) {
+                                       user_store = Environment.GetEnvironmentVariable ("MONO_CURRENTUSER_REGISTRY_PATH");
+                                       if (string.IsNullOrEmpty(user_store)) {
+                                               user_store = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal),
+                                               ".mono/registry");
+                                       }
+                               }
 
                                return user_store;
                        }