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 ideaviewer-2-initial-appearance
parent
1087d6042b
commit
d7bca3d8e8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue