mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
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
This commit is contained in:
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
/// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version
|
||||
/// bumps here should be compatible.
|
||||
/// </summary>
|
||||
public static int MAX_MAJOR_VERSION = 0;
|
||||
public static int MAX_MAJOR_VERSION = 1;
|
||||
|
||||
protected Scene m_scene;
|
||||
protected Stream m_loadStream;
|
||||
|
||||
@@ -192,9 +192,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
new AssetsArchiver(archiveWriter), assetUuids,
|
||||
m_scene.AssetService, awre.ReceivedAllAssets).Execute();
|
||||
}
|
||||
finally
|
||||
catch (Exception)
|
||||
{
|
||||
m_saveStream.Close();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
public void TestSaveOarV0_2()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
//log4net.Config.XmlConfigurator.Configure();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
SceneObjectPart part1 = CreateSceneObjectPart1();
|
||||
SceneObjectGroup sog1 = new SceneObjectGroup(part1);
|
||||
|
||||
Reference in New Issue
Block a user