diff --git a/OpenSim/Framework/Serialization/TarArchiveReader.cs b/OpenSim/Framework/Serialization/TarArchiveReader.cs
index da5703f3f9..1088870b0c 100644
--- a/OpenSim/Framework/Serialization/TarArchiveReader.cs
+++ b/OpenSim/Framework/Serialization/TarArchiveReader.cs
@@ -63,7 +63,11 @@ namespace OpenSim.Framework.Serialization
///
/// Used to trim off null chars
///
- protected char[] m_nullCharArray = new char[] { '\0' };
+ protected static char[] m_nullCharArray = new char[] { '\0' };
+ ///
+ /// Used to trim off space chars
+ ///
+ protected static char[] m_spaceCharArray = new char[] { ' ' };
///
/// Generate a tar reader which reads from the given stream.
@@ -195,7 +199,9 @@ namespace OpenSim.Framework.Serialization
///
public static int ConvertOctalBytesToDecimal(byte[] bytes, int startIndex, int count)
{
- string oString = m_asciiEncoding.GetString(bytes, startIndex, count);
+ // Trim leading white space: ancient tars do that instead
+ // of leading 0s :-( don't ask. really.
+ string oString = m_asciiEncoding.GetString(bytes, startIndex, count).TrimStart(m_spaceCharArray);
int d = 0;