* Allow archiver to operate even if there are 0 scene objects to save

0.6.0-stable
Justin Clarke Casey 2008-07-02 23:07:52 +00:00
parent 3183a20632
commit bc20c88a0a
2 changed files with 13 additions and 17 deletions

View File

@ -118,9 +118,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
/// <summary>
/// Create the control file for this archive
/// </summary>
/// <returns>
/// A <see cref="System.String"/>
/// </returns>
/// <returns></returns>
protected string CreateControlFile()
{
StringWriter sw = new StringWriter();

View File

@ -180,21 +180,19 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
GetSceneObjectAssetUuids(sceneObject, assetUuids);
}
if (sceneObjects.Count > 0)
{
m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} scene objects", sceneObjects.Count);
m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} assets", assetUuids.Count);
m_log.DebugFormat(
"[ARCHIVER]: {0} scene objects to serialize requiring save of {1} assets",
sceneObjects.Count, assetUuids.Count);
// Asynchronously request all the assets required to perform this archive operation
ArchiveWriteRequestExecution awre
= new ArchiveWriteRequestExecution(
sceneObjects,
m_scene.RequestModuleInterface<ITerrainModule>(),
m_scene.RequestModuleInterface<IRegionSerialiser>(),
m_scene.RegionInfo.RegionName,
m_savePath);
new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute();
}
// Asynchronously request all the assets required to perform this archive operation
ArchiveWriteRequestExecution awre
= new ArchiveWriteRequestExecution(
sceneObjects,
m_scene.RequestModuleInterface<ITerrainModule>(),
m_scene.RequestModuleInterface<IRegionSerialiser>(),
m_scene.RegionInfo.RegionName,
m_savePath);
new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute();
}
}
}