diff options
author | Justin Clarke Casey | 2008-12-12 21:06:07 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-12-12 21:06:07 +0000 |
commit | 71960f17bc7f5f80dc689ee9e215cfc5f1727e73 (patch) | |
tree | f726f06d6f3ef34b749ea741f479001e3d7bff5c /OpenSim/Framework/Communications/Cache | |
parent | * Create update folder test (diff) | |
download | opensim-SC_OLD-71960f17bc7f5f80dc689ee9e215cfc5f1727e73.zip opensim-SC_OLD-71960f17bc7f5f80dc689ee9e215cfc5f1727e73.tar.gz opensim-SC_OLD-71960f17bc7f5f80dc689ee9e215cfc5f1727e73.tar.bz2 opensim-SC_OLD-71960f17bc7f5f80dc689ee9e215cfc5f1727e73.tar.xz |
* Extend update test to test situation where it also moves the folder
* Correct logic so that update folder behaves as expected
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index dcf63cc..a1b658f 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -415,6 +415,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
415 | 415 | ||
416 | if (m_hasReceivedInventory) | 416 | if (m_hasReceivedInventory) |
417 | { | 417 | { |
418 | InventoryFolderImpl folder = RootFolder.FindFolder(folderID); | ||
419 | |||
420 | // Delegate movement if updated parent id isn't the same as the existing parentId | ||
421 | if (folder.ParentID != parentID) | ||
422 | MoveFolder(folderID, parentID); | ||
423 | |||
418 | InventoryFolderBase baseFolder = new InventoryFolderBase(); | 424 | InventoryFolderBase baseFolder = new InventoryFolderBase(); |
419 | baseFolder.Owner = m_userProfile.ID; | 425 | baseFolder.Owner = m_userProfile.ID; |
420 | baseFolder.ID = folderID; | 426 | baseFolder.ID = folderID; |
@@ -432,13 +438,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
432 | m_commsManager.InventoryService.UpdateFolder(baseFolder); | 438 | m_commsManager.InventoryService.UpdateFolder(baseFolder); |
433 | } | 439 | } |
434 | 440 | ||
435 | InventoryFolderImpl folder = RootFolder.FindFolder(folderID); | 441 | folder.Name = name; |
436 | if (folder != null) | 442 | folder.Type = (short)type; |
437 | { | ||
438 | folder.Name = name; | ||
439 | folder.Type = (short)type; | ||
440 | folder.ParentID = parentID; | ||
441 | } | ||
442 | } | 443 | } |
443 | else | 444 | else |
444 | { | 445 | { |