diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/AssetService/AssetService.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index 0aefa16..5c37c33 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -95,7 +95,7 @@ namespace OpenSim.Services.AssetService | |||
95 | public virtual AssetBase Get(string id) | 95 | public virtual AssetBase Get(string id) |
96 | { | 96 | { |
97 | // m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id); | 97 | // m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id); |
98 | 98 | ||
99 | UUID assetID; | 99 | UUID assetID; |
100 | 100 | ||
101 | if (!UUID.TryParse(id, out assetID)) | 101 | if (!UUID.TryParse(id, out assetID)) |
@@ -166,7 +166,7 @@ namespace OpenSim.Services.AssetService | |||
166 | return new bool[ids.Length]; | 166 | return new bool[ids.Length]; |
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | public virtual string Store(AssetBase asset) | 170 | public virtual string Store(AssetBase asset) |
171 | { | 171 | { |
172 | bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; | 172 | bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; |
@@ -174,12 +174,15 @@ namespace OpenSim.Services.AssetService | |||
174 | { | 174 | { |
175 | // m_log.DebugFormat( | 175 | // m_log.DebugFormat( |
176 | // "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length); | 176 | // "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length); |
177 | m_Database.StoreAsset(asset); | 177 | if (!m_Database.StoreAsset(asset)) |
178 | { | ||
179 | return UUID.Zero.ToString(); | ||
180 | } | ||
178 | } | 181 | } |
179 | // else | 182 | // else |
180 | // { | 183 | // { |
181 | // m_log.DebugFormat( | 184 | // m_log.DebugFormat( |
182 | // "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length); | 185 | // "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length); |
183 | // } | 186 | // } |
184 | 187 | ||
185 | return asset.ID; | 188 | return asset.ID; |