diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index d3f0cbc..6ad9fb8 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -25,11 +25,13 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using OpenSim.Framework; | ||
28 | using OpenSim.Region.Environment.Scenes; | 29 | using OpenSim.Region.Environment.Scenes; |
29 | using OpenSim.Region.Environment.Modules.World.Serialiser; | 30 | using OpenSim.Region.Environment.Modules.World.Serialiser; |
30 | using System; | 31 | using System; |
31 | using System.IO; | 32 | using System.IO; |
32 | using System.Reflection; | 33 | using System.Reflection; |
34 | using libsecondlife; | ||
33 | using log4net; | 35 | using log4net; |
34 | 36 | ||
35 | namespace OpenSim.Region.Environment.Modules.World.Archiver | 37 | namespace OpenSim.Region.Environment.Modules.World.Archiver |
@@ -66,12 +68,35 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
66 | byte[] data; | 68 | byte[] data; |
67 | while ((data = archive.ReadEntry(out filePath)) != null) | 69 | while ((data = archive.ReadEntry(out filePath)) != null) |
68 | { | 70 | { |
69 | m_log.DebugFormat("[ARCHIVER]: Successfully read {0} ({1} bytes) from archive {2}", filePath, data.Length, m_loadPath); | 71 | m_log.DebugFormat( |
72 | "[ARCHIVER]: Successfully read {0} ({1} bytes) from archive {2}", filePath, data.Length, m_loadPath); | ||
70 | 73 | ||
71 | if (filePath.Equals(ArchiveConstants.PRIMS_PATH)) | 74 | if (filePath.Equals(ArchiveConstants.PRIMS_PATH)) |
72 | { | 75 | { |
73 | serializedPrims = m_asciiEncoding.GetString(data); | 76 | serializedPrims = m_asciiEncoding.GetString(data); |
74 | } | 77 | } |
78 | /* | ||
79 | else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) | ||
80 | { | ||
81 | // Right now we're nastily obtaining the lluuid from the filename | ||
82 | string rawId = filePath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); | ||
83 | rawId = rawId.Remove(rawId.Length - ArchiveConstants.TEXTURE_EXTENSION.Length); | ||
84 | |||
85 | m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", rawId); | ||
86 | |||
87 | // Not preserving asset name or description as of yet | ||
88 | AssetBase asset = new AssetBase(new LLUUID(rawId), "imported name"); | ||
89 | asset.Description = "imported description"; | ||
90 | |||
91 | // Only importing textures right now | ||
92 | asset.Type = (sbyte)AssetType.Texture; | ||
93 | asset.InvType = (sbyte)InventoryType.Texture; | ||
94 | |||
95 | asset.Data = data; | ||
96 | |||
97 | m_scene.AssetCache.AddAsset(asset); | ||
98 | } | ||
99 | */ | ||
75 | } | 100 | } |
76 | 101 | ||
77 | m_log.DebugFormat("[ARCHIVER]: Reached end of archive"); | 102 | m_log.DebugFormat("[ARCHIVER]: Reached end of archive"); |