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-03-31 19:51:17 +0100
commit2bf1761ad8f7f4ea60fbcee65ae8782014672874 (patch)
treeb9d825293b49d4d4d40cae63535141c2fbfda0f6 /OpenSim
parentminor: commented out code removal (diff)
downloadopensim-SC-2bf1761ad8f7f4ea60fbcee65ae8782014672874.zip
opensim-SC-2bf1761ad8f7f4ea60fbcee65ae8782014672874.tar.gz
opensim-SC-2bf1761ad8f7f4ea60fbcee65ae8782014672874.tar.bz2
opensim-SC-2bf1761ad8f7f4ea60fbcee65ae8782014672874.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 {