diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index f5b9f2e6ac..46aba6874d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -192,7 +192,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_assetGatherer.GatherAssetUuids(inventoryItem.AssetID, (AssetType)inventoryItem.AssetType, m_assetUuids); } - protected void SaveInvDir(InventoryFolderImpl inventoryFolder, string path) + /// + /// Save an inventory folder + /// + /// The inventory folder to save + /// The path to which the folder should be saved + protected void SaveInvFolder(InventoryFolderImpl inventoryFolder, string path) { path += string.Format( @@ -200,6 +205,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver inventoryFolder.Name, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, inventoryFolder.ID); + + // We need to make sure that we record empty folders m_archive.WriteDir(path); List childFolders = inventoryFolder.RequestListOfFolderImpls(); @@ -228,7 +235,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver foreach (InventoryFolderImpl childFolder in childFolders) { - SaveInvDir(childFolder, path); + SaveInvFolder(childFolder, path); } foreach (InventoryItemBase item in items) @@ -314,8 +321,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver "[INVENTORY ARCHIVER]: Found item {0} {1} at {2}", inventoryItem.Name, inventoryItem.ID, m_invPath); - //get and export item info - SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH + m_invPath); + SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH); } } else @@ -325,7 +331,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver inventoryFolder.Name, inventoryFolder.ID, m_invPath); //recurse through all dirs getting dirs and files - SaveInvDir(inventoryFolder, ArchiveConstants.INVENTORY_PATH); + SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH); } SaveUsers(); @@ -334,7 +340,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// /// Save information for the users that we've collected. - /// XXX: Doesn't actually do this yet. /// protected void SaveUsers() { diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index fe6b0e7c24..d62ce1fc62 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs @@ -38,7 +38,6 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common.Mock; using OpenSim.Tests.Common.Setup; using log4net; -using System.Reflection; namespace OpenSim.Region.Framework.Scenes.Tests {