diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 357ed40..b0f2742 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
45 | { | 45 | { |
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | protected TarArchiveWriter archive = new TarArchiveWriter(); | 48 | protected TarArchiveWriter m_archive; |
49 | protected UuidGatherer m_assetGatherer; | 49 | protected UuidGatherer m_assetGatherer; |
50 | protected Dictionary<UUID, int> assetUuids = new Dictionary<UUID, int>(); | 50 | protected Dictionary<UUID, int> assetUuids = new Dictionary<UUID, int>(); |
51 | 51 | ||
@@ -87,14 +87,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
87 | protected void ReceivedAllAssets(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids) | 87 | protected void ReceivedAllAssets(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids) |
88 | { | 88 | { |
89 | AssetsArchiver assetsArchiver = new AssetsArchiver(assetsFound); | 89 | AssetsArchiver assetsArchiver = new AssetsArchiver(assetsFound); |
90 | assetsArchiver.Archive(archive); | 90 | assetsArchiver.Archive(m_archive); |
91 | 91 | ||
92 | Exception reportedException = null; | 92 | Exception reportedException = null; |
93 | bool succeeded = true; | 93 | bool succeeded = true; |
94 | 94 | ||
95 | try | 95 | try |
96 | { | 96 | { |
97 | archive.WriteTar(m_saveStream); | 97 | m_archive.Close(); |
98 | } | 98 | } |
99 | catch (IOException e) | 99 | catch (IOException e) |
100 | { | 100 | { |
@@ -172,7 +172,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
172 | 172 | ||
173 | writer.WriteEndElement(); | 173 | writer.WriteEndElement(); |
174 | 174 | ||
175 | archive.AddFile(filename, sw.ToString()); | 175 | m_archive.WriteFile(filename, sw.ToString()); |
176 | 176 | ||
177 | m_assetGatherer.GatherAssetUuids(inventoryItem.AssetID, (AssetType)inventoryItem.AssetType, assetUuids); | 177 | m_assetGatherer.GatherAssetUuids(inventoryItem.AssetID, (AssetType)inventoryItem.AssetType, assetUuids); |
178 | } | 178 | } |
@@ -185,7 +185,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
185 | inventoryFolder.Name, | 185 | inventoryFolder.Name, |
186 | InventoryArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, | 186 | InventoryArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, |
187 | inventoryFolder.ID); | 187 | inventoryFolder.ID); |
188 | archive.AddDir(path); | 188 | m_archive.WriteDir(path); |
189 | 189 | ||
190 | List<InventoryFolderImpl> childFolders = inventoryFolder.RequestListOfFolderImpls(); | 190 | List<InventoryFolderImpl> childFolders = inventoryFolder.RequestListOfFolderImpls(); |
191 | List<InventoryItemBase> items = inventoryFolder.RequestListOfItems(); | 191 | List<InventoryItemBase> items = inventoryFolder.RequestListOfItems(); |
@@ -279,6 +279,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
279 | { | 279 | { |
280 | inventoryItem = m_userInfo.RootFolder.FindItemByPath(m_invPath); | 280 | inventoryItem = m_userInfo.RootFolder.FindItemByPath(m_invPath); |
281 | } | 281 | } |
282 | |||
283 | m_archive = new TarArchiveWriter(m_saveStream); | ||
282 | 284 | ||
283 | if (null == inventoryFolder) | 285 | if (null == inventoryFolder) |
284 | { | 286 | { |