diff options
author | Justin Clark-Casey (justincc) | 2010-11-20 02:59:21 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-11-20 02:59:21 +0000 |
commit | d7bca3d8e8f62e938da9fada95f7336710900f4a (patch) | |
tree | f55f7389317f1a7cb518d3e94b645d12bbcf7eb6 /OpenSim | |
parent | correct build break. for some reason, xbuild didn't rebuild test dlls (diff) | |
download | opensim-SC-d7bca3d8e8f62e938da9fada95f7336710900f4a.zip opensim-SC-d7bca3d8e8f62e938da9fada95f7336710900f4a.tar.gz opensim-SC-d7bca3d8e8f62e938da9fada95f7336710900f4a.tar.bz2 opensim-SC-d7bca3d8e8f62e938da9fada95f7336710900f4a.tar.xz |
Fix unit tests and save problems
(note; contrary to previous commits, saving 0.4 OARs is actually broken since serialized objects in inventories are not yet converted properly).
Firstly, if you can save a version 1.0 OAR then you can load it too.
Secondly, closing the save stream even on success before assets/objects are saved is a bad idea
Diffstat (limited to 'OpenSim')
3 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 117b2fd..d5d4468 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
56 | /// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version | 56 | /// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version |
57 | /// bumps here should be compatible. | 57 | /// bumps here should be compatible. |
58 | /// </summary> | 58 | /// </summary> |
59 | public static int MAX_MAJOR_VERSION = 0; | 59 | public static int MAX_MAJOR_VERSION = 1; |
60 | 60 | ||
61 | protected Scene m_scene; | 61 | protected Scene m_scene; |
62 | protected Stream m_loadStream; | 62 | protected Stream m_loadStream; |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 3eb797b..b987b5a 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -192,9 +192,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
192 | new AssetsArchiver(archiveWriter), assetUuids, | 192 | new AssetsArchiver(archiveWriter), assetUuids, |
193 | m_scene.AssetService, awre.ReceivedAllAssets).Execute(); | 193 | m_scene.AssetService, awre.ReceivedAllAssets).Execute(); |
194 | } | 194 | } |
195 | finally | 195 | catch (Exception) |
196 | { | 196 | { |
197 | m_saveStream.Close(); | 197 | m_saveStream.Close(); |
198 | throw; | ||
198 | } | 199 | } |
199 | } | 200 | } |
200 | 201 | ||
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index ade0e11..991bb0f 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -128,7 +128,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
128 | public void TestSaveOarV0_2() | 128 | public void TestSaveOarV0_2() |
129 | { | 129 | { |
130 | TestHelper.InMethod(); | 130 | TestHelper.InMethod(); |
131 | //log4net.Config.XmlConfigurator.Configure(); | 131 | // log4net.Config.XmlConfigurator.Configure(); |
132 | 132 | ||
133 | SceneObjectPart part1 = CreateSceneObjectPart1(); | 133 | SceneObjectPart part1 = CreateSceneObjectPart1(); |
134 | SceneObjectGroup sog1 = new SceneObjectGroup(part1); | 134 | SceneObjectGroup sog1 = new SceneObjectGroup(part1); |