a few changes on assets store and exists return

This commit is contained in:
UbitUmarov
2026-06-19 22:47:12 +01:00
parent 7130e30483
commit effb5784c1
9 changed files with 21 additions and 26 deletions

View File

@@ -168,15 +168,13 @@ namespace OpenSim.Services.AssetService
public virtual string Store(AssetBase asset)
{
bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0];
if (!exists)
bool[] assetsexist = m_Database.AssetsExist([ asset.FullID ] );
if (assetsexist.Length == 0 || !assetsexist[0])
{
// m_log.DebugFormat(
// "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length);
if (!m_Database.StoreAsset(asset))
{
return UUID.Zero.ToString();
}
return UUID.Zero.ToString();
}
// else
// {

View File

@@ -187,9 +187,8 @@ namespace OpenSim.Services.AssetService
public virtual string Store(AssetBase asset)
{
bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0];
if (!exists)
{
bool[] assetsexist = m_Database.AssetsExist([ asset.FullID ] );
if (assetsexist.Length == 0 || !assetsexist[0]) {
// m_log.DebugFormat(
// "[XASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length);
m_Database.StoreAsset(asset);