aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs b/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs
index 8107788..cf15b67 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs
@@ -37,25 +37,25 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Script
37 public static Assembly OnAssemblyResolve(object sender, 37 public static Assembly OnAssemblyResolve(object sender,
38 ResolveEventArgs args) 38 ResolveEventArgs args)
39 { 39 {
40 if(!(sender is System.AppDomain)) 40 if (!(sender is System.AppDomain))
41 return null; 41 return null;
42 42
43 AppDomain myDomain = (AppDomain)sender; 43 AppDomain myDomain = (AppDomain)sender;
44 string dirName = myDomain.FriendlyName; 44 string dirName = myDomain.FriendlyName;
45 45
46 string[] pathList=new string[] {"bin", "ScriptEngines", 46 string[] pathList = new string[] {"bin", "ScriptEngines",
47 Path.Combine("ScriptEngines", dirName)}; 47 Path.Combine("ScriptEngines", dirName)};
48 48
49 string assemblyName = args.Name; 49 string assemblyName = args.Name;
50 if(assemblyName.IndexOf(",") != -1) 50 if (assemblyName.IndexOf(",") != -1)
51 assemblyName=args.Name.Substring(0, args.Name.IndexOf(",")); 51 assemblyName = args.Name.Substring(0, args.Name.IndexOf(","));
52 52
53 foreach (string s in pathList) 53 foreach (string s in pathList)
54 { 54 {
55 string path=Path.Combine(Directory.GetCurrentDirectory(), 55 string path = Path.Combine(Directory.GetCurrentDirectory(),
56 Path.Combine(s, assemblyName))+".dll"; 56 Path.Combine(s, assemblyName))+".dll";
57 57
58 if(File.Exists(path)) 58 if (File.Exists(path))
59 return Assembly.LoadFrom(path); 59 return Assembly.LoadFrom(path);
60 } 60 }
61 61