aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/Compiler.cs
diff options
context:
space:
mode:
authorAdam Johnson2008-06-07 17:43:07 +0000
committerAdam Johnson2008-06-07 17:43:07 +0000
commit990225a4ba79ca05bacc293c416bd4efb6954f48 (patch)
treeda6bdb8d8a48f6aad23458953303c2c48011194f /OpenSim/Region/ScriptEngine/XEngine/Compiler.cs
parentMantis#1476. Thank you kindly, Melanie for a patch that: (diff)
downloadopensim-SC_OLD-990225a4ba79ca05bacc293c416bd4efb6954f48.zip
opensim-SC_OLD-990225a4ba79ca05bacc293c416bd4efb6954f48.tar.gz
opensim-SC_OLD-990225a4ba79ca05bacc293c416bd4efb6954f48.tar.bz2
opensim-SC_OLD-990225a4ba79ca05bacc293c416bd4efb6954f48.tar.xz
Patch for mantis#1493: Several patches to xengine. Thanks Melanie!
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/Compiler.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Compiler.cs11
1 files changed, 8 insertions, 3 deletions
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
257// FilePrefix + "_compiled_" + asset + ".dll"); 257// FilePrefix + "_compiled_" + asset + ".dll");
258 258
259 if (File.Exists(OutFile)) 259 if (File.Exists(OutFile))
260 {
261 m_scriptEngine.Log.DebugFormat("[XEngine] Returning existing assembly for {0}", asset);
260 return OutFile; 262 return OutFile;
263 }
261 264
262 if (!Directory.Exists(ScriptEnginesPath)) 265 if (!Directory.Exists(ScriptEnginesPath))
263 { 266 {
@@ -422,9 +425,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
422 string srcFileName = FilePrefix + "_source_" + Path.GetFileNameWithoutExtension(OutFile) + ext; 425 string srcFileName = FilePrefix + "_source_" + Path.GetFileNameWithoutExtension(OutFile) + ext;
423 try 426 try
424 { 427 {
425 File.WriteAllText( 428 File.WriteAllText(Path.Combine(Path.Combine(
426 Path.Combine("ScriptEngines", srcFileName), 429 ScriptEnginesPath,
427 Script); 430 m_scriptEngine.World.RegionInfo.RegionID.ToString()),
431 srcFileName), Script);
428 } 432 }
429 catch (Exception ex) // NOTLEGIT - Should be just catching FileIOException 433 catch (Exception ex) // NOTLEGIT - Should be just catching FileIOException
430 { 434 {
@@ -504,6 +508,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
504 errtext += "No compile error. But not able to locate compiled file."; 508 errtext += "No compile error. But not able to locate compiled file.";
505 throw new Exception(errtext); 509 throw new Exception(errtext);
506 } 510 }
511 m_scriptEngine.Log.DebugFormat("[XEngine] Compiled new assembly for {0}", asset);
507 return OutFile; 512 return OutFile;
508 } 513 }
509 } 514 }