Merge pull request #1109 from adbre/iss358
[mono.git] / 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;
                        }