diff options
author | Justin Clark-Casey (justincc) | 2012-02-07 17:44:37 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-07 17:44:37 +0000 |
commit | 038d1bf742ba4f95ca8a83b27f6fefb755485524 (patch) | |
tree | ec03beab5a4c0a3afd75b685d629f9d82d4199b9 /OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |
parent | Revert my two quick fixes for the lag issue and put in the real fix, which (diff) | |
download | opensim-SC-038d1bf742ba4f95ca8a83b27f6fefb755485524.zip opensim-SC-038d1bf742ba4f95ca8a83b27f6fefb755485524.tar.gz opensim-SC-038d1bf742ba4f95ca8a83b27f6fefb755485524.tar.bz2 opensim-SC-038d1bf742ba4f95ca8a83b27f6fefb755485524.tar.xz |
Add a regression test to compile and start a script. Remove Path.GetDirectoryName when getting assembly loading path in Compiler.CompileFromDotNetText().
The Path.GetDirectoryName call in Compiler.CompileFromDotNetText is unnecessary since AppDomain.CurrentDomain.BaseDirectory is always a directory.
Later path concatenation is already done by Path.Combine() which handles any trailing slash.
Removing Path.GetDirectoryName() will not affect the runtime but allows NUnit to work since it doesn't add a trailing slash to AppDomain.CurrentDomain.BaseDirectory.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 0c36dcd..f2d1915 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -267,10 +267,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
267 | /// <returns></returns> | 267 | /// <returns></returns> |
268 | public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource) | 268 | public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource) |
269 | { | 269 | { |
270 | // m_log.InfoFormat( | 270 | // m_log.DebugFormat("[PRIM INVENTORY]: Starting script {0} {1} in prim {2} {3} in {4}", |
271 | // "[PRIM INVENTORY]: " + | 271 | // item.Name, item.ItemID, m_part.Name, m_part.UUID, m_part.ParentGroup.Scene.RegionInfo.RegionName); |
272 | // "Starting script {0}, {1} in prim {2}, {3}", | ||
273 | // item.Name, item.ItemID, Name, UUID); | ||
274 | 272 | ||
275 | if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) | 273 | if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) |
276 | return; | 274 | return; |
@@ -299,8 +297,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
299 | if (null == asset) | 297 | if (null == asset) |
300 | { | 298 | { |
301 | m_log.ErrorFormat( | 299 | m_log.ErrorFormat( |
302 | "[PRIM INVENTORY]: " + | 300 | "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", |
303 | "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", | ||
304 | item.Name, item.ItemID, m_part.AbsolutePosition, | 301 | item.Name, item.ItemID, m_part.AbsolutePosition, |
305 | m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); | 302 | m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); |
306 | } | 303 | } |
@@ -400,8 +397,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
400 | CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); | 397 | CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); |
401 | else | 398 | else |
402 | m_log.ErrorFormat( | 399 | m_log.ErrorFormat( |
403 | "[PRIM INVENTORY]: " + | 400 | "[PRIM INVENTORY]: Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", |
404 | "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", | ||
405 | itemId, m_part.Name, m_part.UUID, | 401 | itemId, m_part.Name, m_part.UUID, |
406 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); | 402 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); |
407 | } | 403 | } |