diff options
Diffstat (limited to 'OpenSim/Services/AssetService/XAssetService.cs')
-rw-r--r-- | OpenSim/Services/AssetService/XAssetService.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs index 6047616..f58b769 100644 --- a/OpenSim/Services/AssetService/XAssetService.cs +++ b/OpenSim/Services/AssetService/XAssetService.cs | |||
@@ -175,9 +175,16 @@ namespace OpenSim.Services.AssetService | |||
175 | return true; | 175 | return true; |
176 | } | 176 | } |
177 | 177 | ||
178 | public virtual bool[] AssetsExist(string[] ids) | ||
179 | { | ||
180 | UUID[] uuid = Array.ConvertAll(ids, id => UUID.Parse(id)); | ||
181 | return m_Database.AssetsExist(uuid); | ||
182 | } | ||
183 | |||
178 | public virtual string Store(AssetBase asset) | 184 | public virtual string Store(AssetBase asset) |
179 | { | 185 | { |
180 | if (!m_Database.ExistsAsset(asset.FullID)) | 186 | bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; |
187 | if (!exists) | ||
181 | { | 188 | { |
182 | // m_log.DebugFormat( | 189 | // m_log.DebugFormat( |
183 | // "[XASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length); | 190 | // "[XASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length); |
@@ -217,4 +224,4 @@ namespace OpenSim.Services.AssetService | |||
217 | m_ChainedAssetService.Delete(asset.ID); | 224 | m_ChainedAssetService.Delete(asset.ID); |
218 | } | 225 | } |
219 | } | 226 | } |
220 | } \ No newline at end of file | 227 | } |