mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
a few changes on assets store and exists return
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user