aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/PluginLoader.cs
diff options
context:
space:
mode:
authorMelanie2010-09-24 22:00:51 +0200
committerMelanie2010-09-24 22:00:51 +0200
commit33bd4fe789529e339db8954b29cf49ca7f7a0268 (patch)
tree90101cd13be708ae3bc77f37b94f1e11e5d85c1a /OpenSim/Framework/PluginLoader.cs
parentMerge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/va... (diff)
downloadopensim-SC_OLD-33bd4fe789529e339db8954b29cf49ca7f7a0268.zip
opensim-SC_OLD-33bd4fe789529e339db8954b29cf49ca7f7a0268.tar.gz
opensim-SC_OLD-33bd4fe789529e339db8954b29cf49ca7f7a0268.tar.bz2
opensim-SC_OLD-33bd4fe789529e339db8954b29cf49ca7f7a0268.tar.xz
When clearing the addin registry, respect a custom path
Diffstat (limited to 'OpenSim/Framework/PluginLoader.cs')
-rw-r--r--OpenSim/Framework/PluginLoader.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Framework/PluginLoader.cs b/OpenSim/Framework/PluginLoader.cs
index 819cb7b..cc80943 100644
--- a/OpenSim/Framework/PluginLoader.cs
+++ b/OpenSim/Framework/PluginLoader.cs
@@ -244,13 +244,22 @@ namespace OpenSim.Framework
244 // The Mono addin manager (in Mono.Addins.dll version 0.2.0.0) 244 // The Mono addin manager (in Mono.Addins.dll version 0.2.0.0)
245 // occasionally seems to corrupt its addin cache 245 // occasionally seems to corrupt its addin cache
246 // Hence, as a temporary solution we'll remove it before each startup 246 // Hence, as a temporary solution we'll remove it before each startup
247
248 string customDir = Environment.GetEnvironmentVariable ("MONO_ADDINS_REGISTRY");
249 string v0 = "addin-db-000";
250 string v1 = "addin-db-001";
251 if (customDir != null && customDir != String.Empty)
252 {
253 v0 = Path.Combine(customDir, v0);
254 v1 = Path.Combine(customDir, v1);
255 }
247 try 256 try
248 { 257 {
249 if (Directory.Exists("addin-db-000")) 258 if (Directory.Exists(v0))
250 Directory.Delete("addin-db-000", true); 259 Directory.Delete(v0, true);
251 260
252 if (Directory.Exists("addin-db-001")) 261 if (Directory.Exists(v1))
253 Directory.Delete("addin-db-001", true); 262 Directory.Delete(v1, true);
254 } 263 }
255 catch (IOException) 264 catch (IOException)
256 { 265 {