diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | 13 |
1 files changed, 8 insertions, 5 deletions
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 | |||
100 | 100 | ||
101 | List<InventoryNodeBase> loadedNodes = new List<InventoryNodeBase>(); | 101 | List<InventoryNodeBase> loadedNodes = new List<InventoryNodeBase>(); |
102 | 102 | ||
103 | InventoryFolderBase rootDestinationFolder | 103 | List<InventoryFolderBase> folderCandidates |
104 | = InventoryArchiveUtils.FindFolderByPath( | 104 | = InventoryArchiveUtils.FindFolderByPath( |
105 | m_scene.InventoryService, m_userInfo.PrincipalID, m_invPath); | 105 | m_scene.InventoryService, m_userInfo.PrincipalID, m_invPath); |
106 | 106 | ||
107 | if (null == rootDestinationFolder) | 107 | if (folderCandidates.Count == 0) |
108 | { | 108 | { |
109 | // Possibly provide an option later on to automatically create this folder if it does not exist | 109 | // Possibly provide an option later on to automatically create this folder if it does not exist |
110 | m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath); | 110 | m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath); |
111 | 111 | ||
112 | return loadedNodes; | 112 | return loadedNodes; |
113 | } | 113 | } |
114 | 114 | ||
115 | InventoryFolderBase rootDestinationFolder = folderCandidates[0]; | ||
115 | archive = new TarArchiveReader(m_loadStream); | 116 | archive = new TarArchiveReader(m_loadStream); |
116 | 117 | ||
117 | // In order to load identically named folders, we need to keep track of the folders that we have already | 118 | // 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 | |||
246 | ref string archivePath, | 247 | ref string archivePath, |
247 | Dictionary <string, InventoryFolderBase> resolvedFolders) | 248 | Dictionary <string, InventoryFolderBase> resolvedFolders) |
248 | { | 249 | { |
250 | m_log.DebugFormat("[INVENTORY ARCHIVER]: Resolving destination folder {0}", archivePath); | ||
251 | |||
249 | string originalArchivePath = archivePath; | 252 | string originalArchivePath = archivePath; |
250 | 253 | ||
251 | InventoryFolderBase destFolder = null; | 254 | InventoryFolderBase destFolder = null; |
@@ -256,8 +259,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
256 | { | 259 | { |
257 | if (resolvedFolders.ContainsKey(archivePath)) | 260 | if (resolvedFolders.ContainsKey(archivePath)) |
258 | { | 261 | { |
259 | // m_log.DebugFormat( | 262 | m_log.DebugFormat( |
260 | // "[INVENTORY ARCHIVER]: Found previously created folder from archive path {0}", archivePath); | 263 | "[INVENTORY ARCHIVER]: Found previously created folder from archive path {0}", archivePath); |
261 | destFolder = resolvedFolders[archivePath]; | 264 | destFolder = resolvedFolders[archivePath]; |
262 | } | 265 | } |
263 | else | 266 | else |