More on mantis #4985
parent
6198fe53e6
commit
436fdc2ea8
|
@ -99,6 +99,8 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
{
|
{
|
||||||
String path = DataFileNameFragment(provider.GetParentScene, provider.Name);
|
String path = DataFileNameFragment(provider.GetParentScene, provider.Name);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
using (XmlTextWriter snapXWriter = new XmlTextWriter(path, Encoding.Default))
|
using (XmlTextWriter snapXWriter = new XmlTextWriter(path, Encoding.Default))
|
||||||
{
|
{
|
||||||
snapXWriter.Formatting = Formatting.Indented;
|
snapXWriter.Formatting = Formatting.Indented;
|
||||||
|
@ -107,6 +109,12 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
snapXWriter.WriteEndDocument();
|
snapXWriter.WriteEndDocument();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[DATASNAPSHOT]: Exception on writing to file {0}: {1}", path, e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//mark provider as not stale, parent scene as stale
|
//mark provider as not stale, parent scene as stale
|
||||||
provider.Stale = false;
|
provider.Stale = false;
|
||||||
|
@ -214,7 +222,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
#region Helpers
|
#region Helpers
|
||||||
private string DataFileNameFragment(Scene scene, String fragmentName)
|
private string DataFileNameFragment(Scene scene, String fragmentName)
|
||||||
{
|
{
|
||||||
return Path.Combine(m_directory, Path.ChangeExtension(Sanitize(scene.RegionInfo.RegionName) + "_" + fragmentName, "xml"));
|
return Path.Combine(m_directory, Path.ChangeExtension(Sanitize(scene.RegionInfo.RegionName + "_" + fragmentName), "xml"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private string DataFileNameScene(Scene scene)
|
private string DataFileNameScene(Scene scene)
|
||||||
|
|
Loading…
Reference in New Issue