From 191661b51d31254419e9b442ec12953772821ac3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 02:01:48 +0100 Subject: a few more changes to iar/oar assets save error/warning to show problems known to be asset errors --- .../Inventory/Archiver/InventoryArchiveWriteRequest.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index d816ba4..ad46107 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -223,10 +223,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) { int curErrorCntr = m_assetGatherer.ErrorCount; + int possible = m_assetGatherer.possibleNotAssetCount; m_assetGatherer.AddForInspection(inventoryItem.AssetID); m_assetGatherer.GatherAll(); curErrorCntr = m_assetGatherer.ErrorCount - curErrorCntr; - if(curErrorCntr > 0) + possible = m_assetGatherer.possibleNotAssetCount - possible; + + if(curErrorCntr > 0 || possible > 0) { string spath; int indx = path.IndexOf("__"); @@ -235,15 +238,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver else spath = path; - if(curErrorCntr > 1) + if(curErrorCntr > 0) { - m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references to possible missing or damaged assets )", + m_log.ErrorFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references to missing or damaged assets", inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, curErrorCntr); + if(possible > 0) + m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item also contains {0} references that may be to missing or damaged assets or not a problem", possible); } - else if(curErrorCntr == 1) - { - m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains a reference to a possible missing or damaged asset)", - inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath); + else if(possible > 0) + { + m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references that may be to missing or damaged assets or not a problem", inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, possible); } } } -- cgit v1.1