Fix bug where outfit folders could not be renamed.
Outfit folders are a type of system folder whose details are allowed to change.0.7.3-extended
parent
96b964f7fa
commit
ba909cb692
|
@ -317,22 +317,36 @@ namespace OpenSim.Services.InventoryService
|
|||
|
||||
public virtual bool UpdateFolder(InventoryFolderBase folder)
|
||||
{
|
||||
// m_log.DebugFormat("[XINVENTORY]: Update folder {0} {1} ({2})", folder.Name, folder.Type, folder.ID);
|
||||
|
||||
XInventoryFolder xFolder = ConvertFromOpenSim(folder);
|
||||
InventoryFolderBase check = GetFolder(folder);
|
||||
|
||||
if (check == null)
|
||||
return AddFolder(folder);
|
||||
|
||||
if (check.Type != -1 || xFolder.type != -1)
|
||||
if ((check.Type != (short)AssetType.Unknown || xFolder.type != (short)AssetType.Unknown)
|
||||
&& (check.Type != (short)AssetType.OutfitFolder || xFolder.type != (short)AssetType.OutfitFolder))
|
||||
{
|
||||
if (xFolder.version > check.Version)
|
||||
if (xFolder.version < check.Version)
|
||||
{
|
||||
// m_log.DebugFormat("[XINVENTORY]: {0} < {1} can't do", xFolder.version, check.Version);
|
||||
return false;
|
||||
}
|
||||
|
||||
check.Version = (ushort)xFolder.version;
|
||||
xFolder = ConvertFromOpenSim(check);
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[XINVENTORY]: Storing version only update to system folder {0} {1} {2}",
|
||||
// xFolder.folderName, xFolder.version, xFolder.type);
|
||||
|
||||
return m_Database.StoreFolder(xFolder);
|
||||
}
|
||||
|
||||
if (xFolder.version < check.Version)
|
||||
xFolder.version = check.Version;
|
||||
|
||||
xFolder.folderID = check.ID;
|
||||
|
||||
return m_Database.StoreFolder(xFolder);
|
||||
|
|
Loading…
Reference in New Issue