aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-03-31 19:51:17 +0100
committerJustin Clark-Casey (justincc)2010-05-20 23:35:36 +0100
commit3b38cc10de9082a037f1aee81877a30b727eea81 (patch)
tree292e2b680c3bae10abb7f34060016ae352cae0af /OpenSim
parentminor: commented out code removal (diff)
downloadopensim-SC-3b38cc10de9082a037f1aee81877a30b727eea81.zip
opensim-SC-3b38cc10de9082a037f1aee81877a30b727eea81.tar.gz
opensim-SC-3b38cc10de9082a037f1aee81877a30b727eea81.tar.bz2
opensim-SC-3b38cc10de9082a037f1aee81877a30b727eea81.tar.xz
When saving an oar/iar, don't attempt to write out the data byte array if it's empty
On Mono 2.6 (and probably before) this causes a non-obvious IOException
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Serialization/TarArchiveWriter.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Framework/Serialization/TarArchiveWriter.cs b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
index 20d0f7e..0bd639f 100644
--- a/OpenSim/Framework/Serialization/TarArchiveWriter.cs
+++ b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
@@ -208,7 +208,9 @@ namespace OpenSim.Framework.Serialization
208 m_bw.Write(header); 208 m_bw.Write(header);
209 209
210 // Write out data 210 // Write out data
211 m_bw.Write(data); 211 // An IOException occurs if we try to write out an empty array in Mono 2.6
212 if (data.Length > 0)
213 m_bw.Write(data);
212 214
213 if (data.Length % 512 != 0) 215 if (data.Length % 512 != 0)
214 { 216 {