Don't copy assets to foreign asset servers when the objects are being deleted
parent
48b6d7ad27
commit
00efc288d1
|
@ -380,7 +380,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
|||
|
||||
m_transactions.RemoveXferUploader(m_transactionID);
|
||||
|
||||
m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(ourClient.AgentId, (AssetType)type, m_asset.FullID, m_asset.Name, 0);
|
||||
m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(item, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -209,7 +209,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
}
|
||||
}
|
||||
|
||||
public void PostInventoryAsset(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel)
|
||||
private void PostInventoryAsset(InventoryItemBase item, int userlevel)
|
||||
{
|
||||
InventoryFolderBase f = m_Scene.InventoryService.GetFolderForType(item.Owner, FolderType.Trash);
|
||||
if (f == null || (f != null && item.Folder != f.ID))
|
||||
PostInventoryAsset(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
|
||||
}
|
||||
|
||||
private void PostInventoryAsset(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel)
|
||||
{
|
||||
if (type == AssetType.Link)
|
||||
return;
|
||||
|
|
|
@ -518,7 +518,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
}
|
||||
|
||||
// This is a hook to do some per-asset post-processing for subclasses that need that
|
||||
if (remoteClient != null)
|
||||
if (remoteClient != null && action != DeRezAction.Delete)
|
||||
ExportAsset(remoteClient.AgentId, asset.FullID);
|
||||
|
||||
return item;
|
||||
|
|
|
@ -745,7 +745,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public event OnIncomingSceneObjectDelegate OnIncomingSceneObject;
|
||||
public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so);
|
||||
|
||||
public delegate void NewInventoryItemUploadComplete(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel);
|
||||
public delegate void NewInventoryItemUploadComplete(InventoryItemBase item, int userlevel);
|
||||
|
||||
public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
|
||||
|
||||
|
@ -2208,7 +2208,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, AssetType type, UUID AssetID, String AssetName, int userlevel)
|
||||
public void TriggerOnNewInventoryItemUploadComplete(InventoryItemBase item, int userlevel)
|
||||
{
|
||||
NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete;
|
||||
if (handlerNewInventoryItemUpdateComplete != null)
|
||||
|
@ -2217,7 +2217,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
try
|
||||
{
|
||||
d(agentID, type, AssetID, AssetName, userlevel);
|
||||
d(item, userlevel);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
userlevel = 1;
|
||||
}
|
||||
if (trigger)
|
||||
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
|
||||
EventManager.TriggerOnNewInventoryItemUploadComplete(item, userlevel);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
userlevel = 1;
|
||||
}
|
||||
if (trigger)
|
||||
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
|
||||
EventManager.TriggerOnNewInventoryItemUploadComplete(item, userlevel);
|
||||
|
||||
if (originalFolder != UUID.Zero)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue