diff options
author | Diva Canto | 2010-08-26 14:48:29 -0700 |
---|---|---|
committer | Diva Canto | 2010-08-26 14:49:30 -0700 |
commit | 711747dd2cf2c2fed1ecf5f5ed302fbc850618e3 (patch) | |
tree | 34f513182e10afa91d327a876334b5fd16c78997 /OpenSim | |
parent | Addresses mantis #4985 -- exceptions in DataSnapshot (diff) | |
download | opensim-SC_OLD-711747dd2cf2c2fed1ecf5f5ed302fbc850618e3.zip opensim-SC_OLD-711747dd2cf2c2fed1ecf5f5ed302fbc850618e3.tar.gz opensim-SC_OLD-711747dd2cf2c2fed1ecf5f5ed302fbc850618e3.tar.bz2 opensim-SC_OLD-711747dd2cf2c2fed1ecf5f5ed302fbc850618e3.tar.xz |
More on mantis #4985
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/DataSnapshot/SnapshotStore.cs | 20 |
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) |