From 95595a8360f5d689dc1f680d53773866a9723f84 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 23 Jun 2017 17:23:28 +0100 Subject: coment out missing or damage assets messages in uuidgather that are not very usefull. In IAR save display information about items that contain references to broken assets. Note that as explained on mantis 8195 this can't will not detect all problems --- .../Archiver/InventoryArchiveWriteRequest.cs | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 144cbbe..f89b904 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -218,10 +218,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver // Count inventory items (different to asset count) CountItems++; - + // Don't chase down link asset items as they actually point to their target item IDs rather than an asset if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) + { + int curErrorCntr = m_assetGatherer.ErrorCount; m_assetGatherer.AddForInspection(inventoryItem.AssetID); + m_assetGatherer.GatherAll(); + curErrorCntr = m_assetGatherer.ErrorCount - curErrorCntr; + if(curErrorCntr > 0) + { + string spath; + int indx = path.IndexOf("__"); + if(indx > 0) + spath = path.Substring(0,indx); + else + spath = path; + + if(curErrorCntr > 1) + { + m_log.WarnFormat("[INVENTORY ARCHIVER]: item {0} '{1}', type {2}, in '{3}', contains at least {4} references to missing or damaged assets", + inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, curErrorCntr); + } + else if(curErrorCntr == 1) + { + m_log.WarnFormat("[INVENTORY ARCHIVER]: item {0} '{1}', type {2}, in '{3}', contains at least 1 reference to a missing or damaged asset", + inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath); + } + } + } } /// @@ -427,7 +452,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_log.DebugFormat( "[INVENTORY ARCHIVER]: The items to save reference {0} assets", m_assetGatherer.GatheredUuids.Count + errors); if(errors > 0) - m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of this assets have problems and will be ignored", errors); + m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of these assets have problems and will be ignored", errors); AssetsRequest ar = new AssetsRequest( new AssetsArchiver(m_archiveWriter), -- cgit v1.1