aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-03-12 00:28:23 +0000
committerJustin Clark-Casey (justincc)2011-03-12 00:28:23 +0000
commita3c7c04ead1b1388d2093edf66d37edecdeccc61 (patch)
tree8a0ff071980a8fde3b27d7ec708496f32aa777e8 /OpenSim
parentintroduce iar load checks which make sure archive.xml comes first, then inven... (diff)
downloadopensim-SC_OLD-a3c7c04ead1b1388d2093edf66d37edecdeccc61.zip
opensim-SC_OLD-a3c7c04ead1b1388d2093edf66d37edecdeccc61.tar.gz
opensim-SC_OLD-a3c7c04ead1b1388d2093edf66d37edecdeccc61.tar.bz2
opensim-SC_OLD-a3c7c04ead1b1388d2093edf66d37edecdeccc61.tar.xz
refactor: make boolean load indicators on load iars instance fields
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs19
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index 4d97c0a..367960c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -82,6 +82,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
82 /// after OSP resolution (since OSP creators are only stored in the item 82 /// after OSP resolution (since OSP creators are only stored in the item
83 /// </summary> 83 /// </summary>
84 protected Dictionary<UUID, UUID> m_creatorIdForAssetId = new Dictionary<UUID, UUID>(); 84 protected Dictionary<UUID, UUID> m_creatorIdForAssetId = new Dictionary<UUID, UUID>();
85
86 protected bool m_controlFileLoaded;
87 protected bool m_assetsLoaded;
88 protected bool m_inventoryNodesLoaded;
85 89
86 public InventoryArchiveReadRequest( 90 public InventoryArchiveReadRequest(
87 Scene scene, UserAccount userInfo, string invPath, string loadPath, bool merge) 91 Scene scene, UserAccount userInfo, string invPath, string loadPath, bool merge)
@@ -144,24 +148,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
144 148
145 byte[] data; 149 byte[] data;
146 TarArchiveReader.TarEntryType entryType; 150 TarArchiveReader.TarEntryType entryType;
147 bool controlFileLoaded = false, assetsLoaded = false, inventoryNodesLoaded = false;
148 151
149 while ((data = archive.ReadEntry(out filePath, out entryType)) != null) 152 while ((data = archive.ReadEntry(out filePath, out entryType)) != null)
150 { 153 {
151 if (filePath == ArchiveConstants.CONTROL_FILE_PATH) 154 if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
152 { 155 {
153 LoadControlFile(filePath, data); 156 LoadControlFile(filePath, data);
154 controlFileLoaded = true; 157 m_controlFileLoaded = true;
155 } 158 }
156 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 159 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
157 { 160 {
158 if (!controlFileLoaded) 161 if (!m_controlFileLoaded)
159 throw new Exception( 162 throw new Exception(
160 string.Format( 163 string.Format(
161 "The IAR you are trying to load does not list {0} before {1}. Aborting load", 164 "The IAR you are trying to load does not list {0} before {1}. Aborting load",
162 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.ASSETS_PATH)); 165 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.ASSETS_PATH));
163 166
164 if (!inventoryNodesLoaded) 167 if (!m_inventoryNodesLoaded)
165 throw new Exception( 168 throw new Exception(
166 string.Format( 169 string.Format(
167 "The IAR you are trying to load does not list all {0} before {1}. Aborting load", 170 "The IAR you are trying to load does not list all {0} before {1}. Aborting load",
@@ -177,17 +180,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
177 "[INVENTORY ARCHIVER]: Loaded {0} assets...", 180 "[INVENTORY ARCHIVER]: Loaded {0} assets...",
178 successfulAssetRestores); 181 successfulAssetRestores);
179 182
180 assetsLoaded = true; 183 m_assetsLoaded = true;
181 } 184 }
182 else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) 185 else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH))
183 { 186 {
184 if (!controlFileLoaded) 187 if (!m_controlFileLoaded)
185 throw new Exception( 188 throw new Exception(
186 string.Format( 189 string.Format(
187 "The IAR you are trying to load does not list {0} before {1}. Aborting load", 190 "The IAR you are trying to load does not list {0} before {1}. Aborting load",
188 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.INVENTORY_PATH)); 191 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.INVENTORY_PATH));
189 192
190 if (assetsLoaded) 193 if (m_assetsLoaded)
191 throw new Exception( 194 throw new Exception(
192 string.Format( 195 string.Format(
193 "The IAR you are trying to load does not list all {0} before {1}. Aborting load", 196 "The IAR you are trying to load does not list all {0} before {1}. Aborting load",
@@ -218,7 +221,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
218 } 221 }
219 } 222 }
220 223
221 inventoryNodesLoaded = true; 224 m_inventoryNodesLoaded = true;
222 } 225 }
223 } 226 }
224 227