aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs10
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs3
2 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 25a78ff..9908018 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -221,7 +221,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
221 InventoryItemBase inventoryItem = null; 221 InventoryItemBase inventoryItem = null;
222 InventoryFolderBase rootFolder = m_scene.InventoryService.GetRootFolder(m_userInfo.PrincipalID); 222 InventoryFolderBase rootFolder = m_scene.InventoryService.GetRootFolder(m_userInfo.PrincipalID);
223 223
224 bool foundStar = false; 224 bool saveFolderContentsOnly = false;
225 225
226 // Eliminate double slashes and any leading / on the path. 226 // Eliminate double slashes and any leading / on the path.
227 string[] components 227 string[] components
@@ -234,7 +234,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
234 // folder itself. This may get more sophisicated later on 234 // folder itself. This may get more sophisicated later on
235 if (maxComponentIndex >= 0 && components[maxComponentIndex] == STAR_WILDCARD) 235 if (maxComponentIndex >= 0 && components[maxComponentIndex] == STAR_WILDCARD)
236 { 236 {
237 foundStar = true; 237 saveFolderContentsOnly = true;
238 maxComponentIndex--; 238 maxComponentIndex--;
239 } 239 }
240 240
@@ -281,10 +281,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
281 { 281 {
282 m_log.DebugFormat( 282 m_log.DebugFormat(
283 "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", 283 "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}",
284 inventoryFolder.Name, inventoryFolder.ID, m_invPath); 284 inventoryFolder.Name,
285 inventoryFolder.ID,
286 m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath );
285 287
286 //recurse through all dirs getting dirs and files 288 //recurse through all dirs getting dirs and files
287 SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar); 289 SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly);
288 } 290 }
289 else if (inventoryItem != null) 291 else if (inventoryItem != null)
290 { 292 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index b5f9a8e..0218f86 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -168,6 +168,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
168 MemoryStream archiveWriteStream = new MemoryStream(); 168 MemoryStream archiveWriteStream = new MemoryStream();
169 archiverModule.OnInventoryArchiveSaved += SaveCompleted; 169 archiverModule.OnInventoryArchiveSaved += SaveCompleted;
170 170
171 // Test saving a particular path
171 mre.Reset(); 172 mre.Reset();
172 archiverModule.ArchiveInventory( 173 archiverModule.ArchiveInventory(
173 Guid.NewGuid(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream); 174 Guid.NewGuid(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream);
@@ -194,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
194 195
195 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 196 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
196 { 197 {
197 Console.WriteLine("Got {0}", filePath); 198// Console.WriteLine("Got {0}", filePath);
198 199
199// if (ArchiveConstants.CONTROL_FILE_PATH == filePath) 200// if (ArchiveConstants.CONTROL_FILE_PATH == filePath)
200// { 201// {