diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index f002ad7..520ea50 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -218,10 +218,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
218 | 218 | ||
219 | // Count inventory items (different to asset count) | 219 | // Count inventory items (different to asset count) |
220 | CountItems++; | 220 | CountItems++; |
221 | 221 | ||
222 | // Don't chase down link asset items as they actually point to their target item IDs rather than an asset | 222 | // Don't chase down link asset items as they actually point to their target item IDs rather than an asset |
223 | if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) | 223 | if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) |
224 | { | ||
225 | int curErrorCntr = m_assetGatherer.ErrorCount; | ||
226 | int possible = m_assetGatherer.possibleNotAssetCount; | ||
224 | m_assetGatherer.AddForInspection(inventoryItem.AssetID); | 227 | m_assetGatherer.AddForInspection(inventoryItem.AssetID); |
228 | m_assetGatherer.GatherAll(); | ||
229 | curErrorCntr = m_assetGatherer.ErrorCount - curErrorCntr; | ||
230 | possible = m_assetGatherer.possibleNotAssetCount - possible; | ||
231 | |||
232 | if(curErrorCntr > 0 || possible > 0) | ||
233 | { | ||
234 | if(curErrorCntr > 0) | ||
235 | { | ||
236 | // path is /name__UUID/name__UUID ... | ||
237 | m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references to missing or damaged assets, or not a problem.", | ||
238 | inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), path, curErrorCntr); | ||
239 | //// if(possible > 0) | ||
240 | //// m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item also contains {0} references that may be to missing or damaged assets or not a problem", possible); | ||
241 | } | ||
242 | //// else if(possible > 0) | ||
243 | //// { | ||
244 | //// 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); | ||
245 | //// } | ||
246 | } | ||
247 | } | ||
225 | } | 248 | } |
226 | 249 | ||
227 | /// <summary> | 250 | /// <summary> |
@@ -381,6 +404,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
381 | string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); | 404 | string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); |
382 | Exception e = new InventoryArchiverException(errorMessage); | 405 | Exception e = new InventoryArchiverException(errorMessage); |
383 | m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e, 0, 0); | 406 | m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e, 0, 0); |
407 | if(m_saveStream != null && m_saveStream.CanWrite) | ||
408 | m_saveStream.Close(); | ||
384 | throw e; | 409 | throw e; |
385 | } | 410 | } |
386 | 411 | ||
@@ -420,17 +445,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
420 | { | 445 | { |
421 | m_assetGatherer.GatherAll(); | 446 | m_assetGatherer.GatherAll(); |
422 | 447 | ||
448 | int errors = m_assetGatherer.FailedUUIDs.Count; | ||
449 | |||
423 | m_log.DebugFormat( | 450 | m_log.DebugFormat( |
424 | "[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetGatherer.GatheredUuids.Count); | 451 | "[INVENTORY ARCHIVER]: The items to save reference {0} possible assets", m_assetGatherer.GatheredUuids.Count + errors); |
452 | if(errors > 0) | ||
453 | m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of these have problems or are not assets and will be ignored", errors); | ||
425 | 454 | ||
426 | AssetsRequest ar | 455 | AssetsRequest ar = new AssetsRequest( |
427 | = new AssetsRequest( | ||
428 | new AssetsArchiver(m_archiveWriter), | 456 | new AssetsArchiver(m_archiveWriter), |
429 | m_assetGatherer.GatheredUuids, m_scene.AssetService, | 457 | m_assetGatherer.GatheredUuids, m_assetGatherer.FailedUUIDs.Count, |
458 | m_scene.AssetService, | ||
430 | m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, | 459 | m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, |
431 | options, ReceivedAllAssets); | 460 | options, ReceivedAllAssets); |
432 | 461 | ar.Execute(); | |
433 | WorkManager.RunInThread(o => ar.Execute(), null, string.Format("AssetsRequest ({0})", m_scene.Name)); | ||
434 | } | 462 | } |
435 | else | 463 | else |
436 | { | 464 | { |