aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Serialization/TarArchiveWriter.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Serialization/TarArchiveWriter.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Framework/Serialization/TarArchiveWriter.cs b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
index 2a3bc48..a5c3d0a 100644
--- a/OpenSim/Framework/Serialization/TarArchiveWriter.cs
+++ b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Framework.Serialization
113 lock (m_bw) 113 lock (m_bw)
114 { 114 {
115 m_bw.Write(finalZeroPadding); 115 m_bw.Write(finalZeroPadding);
116 116
117 m_bw.Flush(); 117 m_bw.Flush();
118 m_bw.Close(); 118 m_bw.Close();
119 } 119 }
@@ -149,7 +149,7 @@ namespace OpenSim.Framework.Serialization
149 { 149 {
150// m_log.DebugFormat( 150// m_log.DebugFormat(
151// "[TAR ARCHIVE WRITER]: Data for {0} is {1} bytes", filePath, (null == data ? "null" : data.Length.ToString())); 151// "[TAR ARCHIVE WRITER]: Data for {0} is {1} bytes", filePath, (null == data ? "null" : data.Length.ToString()));
152 152
153 byte[] header = new byte[512]; 153 byte[] header = new byte[512];
154 154
155 // file path field (100) 155 // file path field (100)
@@ -208,18 +208,18 @@ namespace OpenSim.Framework.Serialization
208 { 208 {
209 // Write out header 209 // Write out header
210 m_bw.Write(header); 210 m_bw.Write(header);
211 211
212 // Write out data 212 // Write out data
213 // An IOException occurs if we try to write out an empty array in Mono 2.6 213 // An IOException occurs if we try to write out an empty array in Mono 2.6
214 if (data.Length > 0) 214 if (data.Length > 0)
215 m_bw.Write(data); 215 m_bw.Write(data);
216 216
217 if (data.Length % 512 != 0) 217 if (data.Length % 512 != 0)
218 { 218 {
219 int paddingRequired = 512 - (data.Length % 512); 219 int paddingRequired = 512 - (data.Length % 512);
220 220
221 //m_log.DebugFormat("[TAR ARCHIVE WRITER]: Padding data with {0} bytes", paddingRequired); 221 //m_log.DebugFormat("[TAR ARCHIVE WRITER]: Padding data with {0} bytes", paddingRequired);
222 222
223 byte[] padding = new byte[paddingRequired]; 223 byte[] padding = new byte[paddingRequired];
224 m_bw.Write(padding); 224 m_bw.Write(padding);
225 } 225 }