From cf4721a92d3b0f9f3660406eca91ef76b230682a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 18 Jun 2010 16:33:34 +0100 Subject: in IAR utils, return all folders that match a particular path rather than just the first one --- .../Inventory/Archiver/InventoryArchiveReadRequest.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index b4f1ed6..29e992e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -100,18 +100,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver List loadedNodes = new List(); - InventoryFolderBase rootDestinationFolder + List folderCandidates = InventoryArchiveUtils.FindFolderByPath( m_scene.InventoryService, m_userInfo.PrincipalID, m_invPath); - if (null == rootDestinationFolder) + if (folderCandidates.Count == 0) { // Possibly provide an option later on to automatically create this folder if it does not exist m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath); return loadedNodes; } - + + InventoryFolderBase rootDestinationFolder = folderCandidates[0]; archive = new TarArchiveReader(m_loadStream); // In order to load identically named folders, we need to keep track of the folders that we have already @@ -246,6 +247,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver ref string archivePath, Dictionary resolvedFolders) { + m_log.DebugFormat("[INVENTORY ARCHIVER]: Resolving destination folder {0}", archivePath); + string originalArchivePath = archivePath; InventoryFolderBase destFolder = null; @@ -256,8 +259,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (resolvedFolders.ContainsKey(archivePath)) { -// m_log.DebugFormat( -// "[INVENTORY ARCHIVER]: Found previously created folder from archive path {0}", archivePath); + m_log.DebugFormat( + "[INVENTORY ARCHIVER]: Found previously created folder from archive path {0}", archivePath); destFolder = resolvedFolders[archivePath]; } else -- cgit v1.1