Remove bug where iar created folders could not be deleted after relog

New folders need to be created with AssetType.Unknown rather than AssetType.Folder!
remotes/origin/0.6.7-post-fixes
Justin Clark-Casey (justincc) 2009-09-11 16:51:57 +01:00
parent e7934c9da0
commit 212efc0c76
2 changed files with 7 additions and 3 deletions

View File

@ -290,11 +290,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex); string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex);
UUID newFolderId = UUID.Random(); UUID newFolderId = UUID.Random();
// Asset type has to be Unknown here rather than Folder, otherwise the created folder can't be
// deleted once the client has relogged.
// The root folder appears to be labelled AssetType.Folder (shows up as "Category" in the client)
// even though there is a AssetType.RootCategory
destFolder destFolder
= new InventoryFolderBase( = new InventoryFolderBase(
newFolderId, newFolderName, m_userInfo.UserProfile.ID, newFolderId, newFolderName, m_userInfo.UserProfile.ID,
(short)AssetType.Folder, destFolder.ID, 1); (short)AssetType.Unknown, destFolder.ID, 1);
m_scene.InventoryService.AddFolder(destFolder); m_scene.InventoryService.AddFolder(destFolder);
// UUID newFolderId = UUID.Random(); // UUID newFolderId = UUID.Random();

View File

@ -410,4 +410,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
id); id);
} }
} }
} }