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 IOExceptionslimupdates
parent
8cb81bdc9b
commit
2bf1761ad8
|
@ -208,7 +208,9 @@ namespace OpenSim.Framework.Serialization
|
|||
m_bw.Write(header);
|
||||
|
||||
// Write out data
|
||||
m_bw.Write(data);
|
||||
// An IOException occurs if we try to write out an empty array in Mono 2.6
|
||||
if (data.Length > 0)
|
||||
m_bw.Write(data);
|
||||
|
||||
if (data.Length % 512 != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue