diff options
author | Justin Clarke Casey | 2009-02-17 18:19:24 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-17 18:19:24 +0000 |
commit | e28738c13b4eb3e1a3a2fc6e8edbc2584e50c0fb (patch) | |
tree | 2b19032e40d6a3ea4d2d9db9092e6bbc529b2241 /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |
parent | * extend inventory archive save test to check for the presence of the item fi... (diff) | |
download | opensim-SC_OLD-e28738c13b4eb3e1a3a2fc6e8edbc2584e50c0fb.zip opensim-SC_OLD-e28738c13b4eb3e1a3a2fc6e8edbc2584e50c0fb.tar.gz opensim-SC_OLD-e28738c13b4eb3e1a3a2fc6e8edbc2584e50c0fb.tar.bz2 opensim-SC_OLD-e28738c13b4eb3e1a3a2fc6e8edbc2584e50c0fb.tar.xz |
* Assign incoming items with a random UUID so that archives can be loaded more than once
* Also remove a duplicate write archive call in the unit test which might be causing test failures for people using mono 2.2 (though not 1.9.1, it would seem)
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 6b57ac5..dfa4100 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -104,17 +104,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
104 | reader.ReadStartElement("Owner"); | 104 | reader.ReadStartElement("Owner"); |
105 | item.Owner = UUID.Parse(reader.ReadString()); | 105 | item.Owner = UUID.Parse(reader.ReadString()); |
106 | reader.ReadEndElement(); | 106 | reader.ReadEndElement(); |
107 | //No description would kill it | 107 | reader.ReadElementString("Description"); |
108 | if (reader.IsEmptyElement) | ||
109 | { | ||
110 | reader.ReadStartElement("Description"); | ||
111 | } | ||
112 | else | ||
113 | { | ||
114 | reader.ReadStartElement("Description"); | ||
115 | item.Description = reader.ReadString(); | ||
116 | reader.ReadEndElement(); | ||
117 | } | ||
118 | reader.ReadStartElement("AssetType"); | 108 | reader.ReadStartElement("AssetType"); |
119 | item.AssetType = Convert.ToInt32(reader.ReadString()); | 109 | item.AssetType = Convert.ToInt32(reader.ReadString()); |
120 | reader.ReadEndElement(); | 110 | reader.ReadEndElement(); |
@@ -225,6 +215,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
225 | 215 | ||
226 | if (item != null) | 216 | if (item != null) |
227 | { | 217 | { |
218 | // Don't use the item ID that's in the file | ||
219 | item.ID = UUID.Random(); | ||
220 | |||
228 | item.Creator = m_userInfo.UserProfile.ID; | 221 | item.Creator = m_userInfo.UserProfile.ID; |
229 | item.Owner = m_userInfo.UserProfile.ID; | 222 | item.Owner = m_userInfo.UserProfile.ID; |
230 | 223 | ||