From 990225a4ba79ca05bacc293c416bd4efb6954f48 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 7 Jun 2008 17:43:07 +0000 Subject: Patch for mantis#1493: Several patches to xengine. Thanks Melanie! --- OpenSim/Region/ScriptEngine/XEngine/Compiler.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/XEngine/Compiler.cs') diff --git a/OpenSim/Region/ScriptEngine/XEngine/Compiler.cs b/OpenSim/Region/ScriptEngine/XEngine/Compiler.cs index 3ff7ce0..68fb1dd 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Compiler.cs @@ -257,7 +257,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine // FilePrefix + "_compiled_" + asset + ".dll"); if (File.Exists(OutFile)) + { + m_scriptEngine.Log.DebugFormat("[XEngine] Returning existing assembly for {0}", asset); return OutFile; + } if (!Directory.Exists(ScriptEnginesPath)) { @@ -422,9 +425,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine string srcFileName = FilePrefix + "_source_" + Path.GetFileNameWithoutExtension(OutFile) + ext; try { - File.WriteAllText( - Path.Combine("ScriptEngines", srcFileName), - Script); + File.WriteAllText(Path.Combine(Path.Combine( + ScriptEnginesPath, + m_scriptEngine.World.RegionInfo.RegionID.ToString()), + srcFileName), Script); } catch (Exception ex) // NOTLEGIT - Should be just catching FileIOException { @@ -504,6 +508,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine errtext += "No compile error. But not able to locate compiled file."; throw new Exception(errtext); } + m_scriptEngine.Log.DebugFormat("[XEngine] Compiled new assembly for {0}", asset); return OutFile; } } -- cgit v1.1