Fix issue where a new outfit folder is not created when a new outfit is saved if there are no previous outfits
This was because AddFolder() was disallowing these though they are legal.0.7.3-extended
parent
e5f3af4abe
commit
7bbab2f1d5
|
@ -40,9 +40,9 @@ namespace OpenSim.Services.InventoryService
|
||||||
{
|
{
|
||||||
public class XInventoryService : ServiceBase, IInventoryService
|
public class XInventoryService : ServiceBase, IInventoryService
|
||||||
{
|
{
|
||||||
// private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
// LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected IXInventoryData m_Database;
|
protected IXInventoryData m_Database;
|
||||||
protected bool m_AllowDelete = true;
|
protected bool m_AllowDelete = true;
|
||||||
|
@ -297,8 +297,22 @@ namespace OpenSim.Services.InventoryService
|
||||||
if (check != null)
|
if (check != null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
XInventoryFolder xFolder = ConvertFromOpenSim(folder);
|
if (folder.Type == (short)AssetType.Folder
|
||||||
return m_Database.StoreFolder(xFolder);
|
|| folder.Type == (short)AssetType.Unknown
|
||||||
|
|| folder.Type == (short)AssetType.OutfitFolder
|
||||||
|
|| GetFolderForType(folder.Owner, (AssetType)(folder.Type)) == null)
|
||||||
|
{
|
||||||
|
XInventoryFolder xFolder = ConvertFromOpenSim(folder);
|
||||||
|
return m_Database.StoreFolder(xFolder);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[XINVENTORY]: Folder of type {0} already exists when tried to add {1} to {2} for {3}",
|
||||||
|
folder.Type, folder.Name, folder.ParentID, folder.Owner);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool UpdateFolder(InventoryFolderBase folder)
|
public virtual bool UpdateFolder(InventoryFolderBase folder)
|
||||||
|
|
Loading…
Reference in New Issue