aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2010-08-26 14:48:29 -0700
committerDiva Canto2010-08-26 14:48:29 -0700
commit436fdc2ea828d5bc4fa1a1aa7d4b796ac77cc932 (patch)
tree20b50e9a7984e97560c0b2f0b058cc5a52f8e832 /OpenSim/Region
parentAddresses mantis #4985 -- exceptions in DataSnapshot (diff)
downloadopensim-SC_OLD-436fdc2ea828d5bc4fa1a1aa7d4b796ac77cc932.zip
opensim-SC_OLD-436fdc2ea828d5bc4fa1a1aa7d4b796ac77cc932.tar.gz
opensim-SC_OLD-436fdc2ea828d5bc4fa1a1aa7d4b796ac77cc932.tar.bz2
opensim-SC_OLD-436fdc2ea828d5bc4fa1a1aa7d4b796ac77cc932.tar.xz
More on mantis #4985
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/DataSnapshot/SnapshotStore.cs20
1 files changed, 14 insertions, 6 deletions
diff --git a/OpenSim/Region/DataSnapshot/SnapshotStore.cs b/OpenSim/Region/DataSnapshot/SnapshotStore.cs
index 3977394..aa3d2ff 100644
--- a/OpenSim/Region/DataSnapshot/SnapshotStore.cs
+++ b/OpenSim/Region/DataSnapshot/SnapshotStore.cs
@@ -99,13 +99,21 @@ namespace OpenSim.Region.DataSnapshot
99 { 99 {
100 String path = DataFileNameFragment(provider.GetParentScene, provider.Name); 100 String path = DataFileNameFragment(provider.GetParentScene, provider.Name);
101 101
102 using (XmlTextWriter snapXWriter = new XmlTextWriter(path, Encoding.Default)) 102 try
103 { 103 {
104 snapXWriter.Formatting = Formatting.Indented; 104 using (XmlTextWriter snapXWriter = new XmlTextWriter(path, Encoding.Default))
105 snapXWriter.WriteStartDocument(); 105 {
106 data.WriteTo(snapXWriter); 106 snapXWriter.Formatting = Formatting.Indented;
107 snapXWriter.WriteEndDocument(); 107 snapXWriter.WriteStartDocument();
108 data.WriteTo(snapXWriter);
109 snapXWriter.WriteEndDocument();
110 }
108 } 111 }
112 catch (Exception e)
113 {
114 m_log.WarnFormat("[DATASNAPSHOT]: Exception on writing to file {0}: {1}", path, e.Message);
115 }
116
109 } 117 }
110 118
111 //mark provider as not stale, parent scene as stale 119 //mark provider as not stale, parent scene as stale
@@ -214,7 +222,7 @@ namespace OpenSim.Region.DataSnapshot
214 #region Helpers 222 #region Helpers
215 private string DataFileNameFragment(Scene scene, String fragmentName) 223 private string DataFileNameFragment(Scene scene, String fragmentName)
216 { 224 {
217 return Path.Combine(m_directory, Path.ChangeExtension(Sanitize(scene.RegionInfo.RegionName) + "_" + fragmentName, "xml")); 225 return Path.Combine(m_directory, Path.ChangeExtension(Sanitize(scene.RegionInfo.RegionName + "_" + fragmentName), "xml"));
218 } 226 }
219 227
220 private string DataFileNameScene(Scene scene) 228 private string DataFileNameScene(Scene scene)