diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/Compiler.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/Compiler.cs | 11 |
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 | } |