diff options
author | Mic Bowman | 2012-01-10 16:26:01 -0800 |
---|---|---|
committer | Mic Bowman | 2012-01-10 16:26:01 -0800 |
commit | 5f7e392c7cc9410262dfb3333d9b60f6ff26eb79 (patch) | |
tree | b3803554b09f62246de0877618f7256699055c4c /OpenSim/Region/CoreModules/World | |
parent | minor: Fix wrong column length in image queues report (diff) | |
download | opensim-SC_OLD-5f7e392c7cc9410262dfb3333d9b60f6ff26eb79.zip opensim-SC_OLD-5f7e392c7cc9410262dfb3333d9b60f6ff26eb79.tar.gz opensim-SC_OLD-5f7e392c7cc9410262dfb3333d9b60f6ff26eb79.tar.bz2 opensim-SC_OLD-5f7e392c7cc9410262dfb3333d9b60f6ff26eb79.tar.xz |
Add a check to see if an asset exists before recreating it while
loading an archive. This does add an extra roundtrip to the asset
server if loading new assets but it protects against overwriting
(and potentially corrupting) existing assets.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 587d260..edc5ba4 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -404,6 +404,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
404 | string extension = filename.Substring(i); | 404 | string extension = filename.Substring(i); |
405 | string uuid = filename.Remove(filename.Length - extension.Length); | 405 | string uuid = filename.Remove(filename.Length - extension.Length); |
406 | 406 | ||
407 | if (m_scene.AssetService.GetMetadata(uuid) != null) | ||
408 | { | ||
409 | // m_log.DebugFormat("[ARCHIVER]: found existing asset {0}",uuid); | ||
410 | return true; | ||
411 | } | ||
412 | |||
407 | if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension)) | 413 | if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension)) |
408 | { | 414 | { |
409 | sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; | 415 | sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; |