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

@@ -314,8 +314,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
public string Store(AssetBase asset)
{
if (m_Cache != null)
m_Cache.Cache(asset);
m_Cache?.Cache(asset);
if (asset.Local)
{

View File

@@ -512,7 +512,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
return m_localConnector.AssetsExist(ids);
else if (m_HGConnector != null)
return m_HGConnector.AssetsExist(ids);
return null;
return [];
}
public string Store(AssetBase asset)
@@ -524,12 +524,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
return null;
id = StoreForeign(asset);
if (m_Cache != null)
{
if (!string.IsNullOrEmpty(id) && !id.Equals(UUID.ZeroString))
m_Cache.Cache(asset);
if (!string.IsNullOrEmpty(id) && !id.Equals(UUID.ZeroString))
{
m_Cache?.Cache(asset);
return id;
}
return id;
else
return string.Empty;
}
if (m_Cache != null)
@@ -541,10 +542,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
id = StoreLocal(asset);
if (string.IsNullOrEmpty(id))
return string.Empty;
return id;
return string.IsNullOrEmpty(id) || id.Equals(UUID.ZeroString) ? string.Empty : id;
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]

View File

@@ -451,7 +451,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
assetStrings[k], existChecks[k] ? "yes" : "no");
sb.Append(cdt.ToString());
sb.Append("\n");
sb.Append('\n');
}
}
else