aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-11-05 18:53:25 +0000
committerJustin Clark-Casey (justincc)2009-11-05 18:53:25 +0000
commit345ddcd0d82b15afa790ede4c1e8d93361a0d405 (patch)
tree69a8280f1ab48491937a2feca44e6b40bcdd83c4 /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
parentPatch by revolution, thank you. Mantis #1789 . Implement friends permissions. (diff)
downloadopensim-SC_OLD-345ddcd0d82b15afa790ede4c1e8d93361a0d405.zip
opensim-SC_OLD-345ddcd0d82b15afa790ede4c1e8d93361a0d405.tar.gz
opensim-SC_OLD-345ddcd0d82b15afa790ede4c1e8d93361a0d405.tar.bz2
opensim-SC_OLD-345ddcd0d82b15afa790ede4c1e8d93361a0d405.tar.xz
* Escape / character when saving items and folders in an iar so that the loader doesn't barf
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index f761bf0..7abaac0 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -161,14 +161,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
161 failedAssetRestores++; 161 failedAssetRestores++;
162 } 162 }
163 else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) 163 else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH))
164 { 164 {
165 InventoryFolderBase foundFolder 165 InventoryFolderBase foundFolder
166 = ReplicateArchivePathToUserInventory( 166 = ReplicateArchivePathToUserInventory(
167 filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, 167 filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType,
168 rootDestinationFolder, foldersCreated, nodesLoaded); 168 rootDestinationFolder, foldersCreated, nodesLoaded);
169 169
170 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType) 170 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType)
171 { 171 {
172 // Escape back characters
173 filePath = filePath.Replace("/", "/");
174 filePath = filePath.Replace("&", "&");
175
172 InventoryItemBase item = UserInventoryItemSerializer.Deserialize(data); 176 InventoryItemBase item = UserInventoryItemSerializer.Deserialize(data);
173 177
174 // Don't use the item ID that's in the file 178 // Don't use the item ID that's in the file
@@ -289,6 +293,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
289 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR); 293 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR);
290 294
291 string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex); 295 string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex);
296
297 // Escape back characters
298 newFolderName = newFolderName.Replace("/", "/");
299 newFolderName = newFolderName.Replace("&", "&");
300
292 UUID newFolderId = UUID.Random(); 301 UUID newFolderId = UUID.Random();
293 302
294 // Asset type has to be Unknown here rather than Folder, otherwise the created folder can't be 303 // Asset type has to be Unknown here rather than Folder, otherwise the created folder can't be