When saving an iar, don't chase down link asset IDs (since these points to other items rather than real assets)

This bug had no practical effect other than to make "save iar" misreport the number of missing assets
0.7.1-dev
Justin Clark-Casey (justincc) 2011-05-27 21:57:54 +01:00
parent b60ce71b2c
commit 85bad46365
1 changed files with 5 additions and 1 deletions

View File

@ -150,7 +150,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
string serialization = UserInventoryItemSerializer.Serialize(inventoryItem, options, userAccountService);
m_archiveWriter.WriteFile(filename, serialization);
m_assetGatherer.GatherAssetUuids(inventoryItem.AssetID, (AssetType)inventoryItem.AssetType, m_assetUuids);
AssetType itemAssetType = (AssetType)inventoryItem.AssetType;
// Don't chase down link asset items as they actually point to their target item IDs rather than an asset
if (itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder)
m_assetGatherer.GatherAssetUuids(inventoryItem.AssetID, (AssetType)inventoryItem.AssetType, m_assetUuids);
}
/// <summary>