Honor the temp and local asset flags

0.6.5-rc1
Melanie Thielker 2009-05-14 03:07:00 +00:00
parent 09df50915d
commit 50b305b006
2 changed files with 12 additions and 0 deletions

View File

@ -208,6 +208,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset
public string Store(AssetBase asset)
{
m_Cache.Cache(asset);
if (asset.Temporary || asset.Local)
return asset.ID;
return m_AssetService.Store(asset);
}

View File

@ -230,6 +230,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset
public string Store(AssetBase asset)
{
if (asset.Temporary || asset.Local)
{
if (m_Cache != null)
m_Cache.Cache(asset);
return asset.ID;
}
string uri = m_ServerURI + "/assets/";
string newID = SynchronousRestObjectRequester.
@ -237,6 +245,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset
if (newID != String.Empty)
{
asset.ID = newID;
if (m_Cache != null)
m_Cache.Cache(asset);
}