aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Serialization/TarArchiveReader.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Framework/Serialization/TarArchiveReader.cs b/OpenSim/Framework/Serialization/TarArchiveReader.cs
index da5703f..1088870 100644
--- a/OpenSim/Framework/Serialization/TarArchiveReader.cs
+++ b/OpenSim/Framework/Serialization/TarArchiveReader.cs
@@ -63,7 +63,11 @@ namespace OpenSim.Framework.Serialization
63 /// <summary> 63 /// <summary>
64 /// Used to trim off null chars 64 /// Used to trim off null chars
65 /// </summary> 65 /// </summary>
66 protected char[] m_nullCharArray = new char[] { '\0' }; 66 protected static char[] m_nullCharArray = new char[] { '\0' };
67 /// <summary>
68 /// Used to trim off space chars
69 /// </summary>
70 protected static char[] m_spaceCharArray = new char[] { ' ' };
67 71
68 /// <summary> 72 /// <summary>
69 /// Generate a tar reader which reads from the given stream. 73 /// Generate a tar reader which reads from the given stream.
@@ -195,7 +199,9 @@ namespace OpenSim.Framework.Serialization
195 /// <returns></returns> 199 /// <returns></returns>
196 public static int ConvertOctalBytesToDecimal(byte[] bytes, int startIndex, int count) 200 public static int ConvertOctalBytesToDecimal(byte[] bytes, int startIndex, int count)
197 { 201 {
198 string oString = m_asciiEncoding.GetString(bytes, startIndex, count); 202 // Trim leading white space: ancient tars do that instead
203 // of leading 0s :-( don't ask. really.
204 string oString = m_asciiEncoding.GetString(bytes, startIndex, count).TrimStart(m_spaceCharArray);
199 205
200 int d = 0; 206 int d = 0;
201 207