diff options
author | Justin Clarke Casey | 2009-02-25 20:07:25 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-25 20:07:25 +0000 |
commit | a5c9354df31c747f33e39631cf33bba593a5f071 (patch) | |
tree | 5a8bdffa874a4072e9d95849f543887c1a8d7896 /OpenSim | |
parent | Renamed IUGAIMCore to IGridServiceCore, still not really happy with this name... (diff) | |
download | opensim-SC_OLD-a5c9354df31c747f33e39631cf33bba593a5f071.zip opensim-SC_OLD-a5c9354df31c747f33e39631cf33bba593a5f071.tar.gz opensim-SC_OLD-a5c9354df31c747f33e39631cf33bba593a5f071.tar.bz2 opensim-SC_OLD-a5c9354df31c747f33e39631cf33bba593a5f071.tar.xz |
* Properly load items into correct folders when an iar is loaded
* At the moment, any existing folders with the same name are reused - will need an option to always create new folders
* not yet ready for general use
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index b61b524..fc63957 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -222,8 +222,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
222 | item.Creator = m_userInfo.UserProfile.ID; | 222 | item.Creator = m_userInfo.UserProfile.ID; |
223 | item.Owner = m_userInfo.UserProfile.ID; | 223 | item.Owner = m_userInfo.UserProfile.ID; |
224 | 224 | ||
225 | /* | ||
226 | filePath = filePath.Substring(InventoryArchiveConstants.INVENTORY_PATH.Length); | 225 | filePath = filePath.Substring(InventoryArchiveConstants.INVENTORY_PATH.Length); |
226 | filePath = filePath.Remove(filePath.LastIndexOf("/")); | ||
227 | |||
228 | m_log.DebugFormat("[INVENTORY ARCHIVER]: Loading to file path {0}", filePath); | ||
229 | |||
227 | string[] rawFolders = filePath.Split(new char[] { '/' }); | 230 | string[] rawFolders = filePath.Split(new char[] { '/' }); |
228 | 231 | ||
229 | // Find the folders that do exist along the path given | 232 | // Find the folders that do exist along the path given |
@@ -248,17 +251,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
248 | // Create any folders that did not previously exist | 251 | // Create any folders that did not previously exist |
249 | while (i < rawFolders.Length) | 252 | while (i < rawFolders.Length) |
250 | { | 253 | { |
251 | m_log.DebugFormat("[INVENTORY ARCHIVER]: Creating folder {0}", rawFolders[i]); | 254 | m_log.DebugFormat("[INVENTORY ARCHIVER]: Creating folder {0}", rawFolders[i]); |
252 | foundFolder.CreateChildFolder(UUID.Random(), rawFolders[i++], (ushort)AssetType.Folder); | 255 | |
256 | UUID newFolderId = UUID.Random(); | ||
257 | m_userInfo.CreateFolder( | ||
258 | rawFolders[i++], newFolderId, (ushort)AssetType.Folder, foundFolder.ID); | ||
259 | foundFolder = foundFolder.GetChildFolder(newFolderId); | ||
253 | } | 260 | } |
254 | 261 | ||
255 | // Reset folder ID to the one in which we want to load it | 262 | // Reset folder ID to the one in which we want to load it |
256 | // TODO: Properly restore entire folder structure. At the moment all items are dumped in this | ||
257 | // single folder no matter where in the saved folder structure they are. | ||
258 | item.Folder = foundFolder.ID; | 263 | item.Folder = foundFolder.ID; |
259 | */ | ||
260 | 264 | ||
261 | item.Folder = rootDestinationFolder.ID; | 265 | //item.Folder = rootDestinationFolder.ID; |
262 | 266 | ||
263 | m_userInfo.AddItem(item); | 267 | m_userInfo.AddItem(item); |
264 | successfulItemRestores++; | 268 | successfulItemRestores++; |
@@ -304,7 +308,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
304 | { | 308 | { |
305 | sbyte assetType = InventoryArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; | 309 | sbyte assetType = InventoryArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; |
306 | 310 | ||
307 | m_log.DebugFormat("[INVENTORY ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); | 311 | //m_log.DebugFormat("[INVENTORY ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); |
308 | 312 | ||
309 | AssetBase asset = new AssetBase(new UUID(uuid), "RandomName"); | 313 | AssetBase asset = new AssetBase(new UUID(uuid), "RandomName"); |
310 | 314 | ||