diff options
author | Melanie | 2012-07-12 08:55:16 +0100 |
---|---|---|
committer | Melanie | 2012-07-12 08:55:16 +0100 |
commit | d632fd7124e3962534fc34f9c7749615dbb62108 (patch) | |
tree | 84ece06822680bfd5b639d9c3fd046ecbb7a154e /OpenSim/Framework/Serialization/TarArchiveReader.cs | |
parent | Merge branch 'avination' into careminster (diff) | |
parent | Many explanitory comments added to the link and delink code in (diff) | |
download | opensim-SC-d632fd7124e3962534fc34f9c7749615dbb62108.zip opensim-SC-d632fd7124e3962534fc34f9c7749615dbb62108.tar.gz opensim-SC-d632fd7124e3962534fc34f9c7749615dbb62108.tar.bz2 opensim-SC-d632fd7124e3962534fc34f9c7749615dbb62108.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Serialization/TarArchiveReader.cs | 8 |
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 | ||