aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Serialization/TarArchiveReader.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Serialization/TarArchiveReader.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/OpenSim/Framework/Serialization/TarArchiveReader.cs b/OpenSim/Framework/Serialization/TarArchiveReader.cs
index 77c29f8..339a37a 100644
--- a/OpenSim/Framework/Serialization/TarArchiveReader.cs
+++ b/OpenSim/Framework/Serialization/TarArchiveReader.cs
@@ -53,8 +53,6 @@ namespace OpenSim.Framework.Serialization
53 TYPE_CONTIGUOUS_FILE = 8, 53 TYPE_CONTIGUOUS_FILE = 8,
54 } 54 }
55 55
56 protected static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding();
57
58 /// <summary> 56 /// <summary>
59 /// Binary reader for the underlying stream 57 /// Binary reader for the underlying stream
60 /// </summary> 58 /// </summary>
@@ -120,13 +118,13 @@ namespace OpenSim.Framework.Serialization
120 if (header[156] == (byte)'L') 118 if (header[156] == (byte)'L')
121 { 119 {
122 int longNameLength = ConvertOctalBytesToDecimal(header, 124, 11); 120 int longNameLength = ConvertOctalBytesToDecimal(header, 124, 11);
123 tarHeader.FilePath = m_asciiEncoding.GetString(ReadData(longNameLength)); 121 tarHeader.FilePath = Encoding.ASCII.GetString(ReadData(longNameLength));
124 //m_log.DebugFormat("[TAR ARCHIVE READER]: Got long file name {0}", tarHeader.FilePath); 122 //m_log.DebugFormat("[TAR ARCHIVE READER]: Got long file name {0}", tarHeader.FilePath);
125 header = m_br.ReadBytes(512); 123 header = m_br.ReadBytes(512);
126 } 124 }
127 else 125 else
128 { 126 {
129 tarHeader.FilePath = m_asciiEncoding.GetString(header, 0, 100); 127 tarHeader.FilePath = Encoding.ASCII.GetString(header, 0, 100);
130 tarHeader.FilePath = tarHeader.FilePath.Trim(m_nullCharArray); 128 tarHeader.FilePath = tarHeader.FilePath.Trim(m_nullCharArray);
131 //m_log.DebugFormat("[TAR ARCHIVE READER]: Got short file name {0}", tarHeader.FilePath); 129 //m_log.DebugFormat("[TAR ARCHIVE READER]: Got short file name {0}", tarHeader.FilePath);
132 } 130 }
@@ -205,7 +203,7 @@ namespace OpenSim.Framework.Serialization
205 { 203 {
206 // Trim leading white space: ancient tars do that instead 204 // Trim leading white space: ancient tars do that instead
207 // of leading 0s :-( don't ask. really. 205 // of leading 0s :-( don't ask. really.
208 string oString = m_asciiEncoding.GetString(bytes, startIndex, count).TrimStart(m_spaceCharArray); 206 string oString = Encoding.ASCII.GetString(bytes, startIndex, count).TrimStart(m_spaceCharArray);
209 207
210 int d = 0; 208 int d = 0;
211 209