aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Archiver
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-06-05 00:01:38 +0000
committerJustin Clarke Casey2008-06-05 00:01:38 +0000
commit7352bd7b992c36026876b4d1fb3e63f02aa984ec (patch)
tree6b7ba49cf4e820292f384f111f25121103633c1a /OpenSim/Region/Environment/Modules/World/Archiver
parent* Dearchive using assets metadata rather than assuming everything is a texture (diff)
downloadopensim-SC-7352bd7b992c36026876b4d1fb3e63f02aa984ec.zip
opensim-SC-7352bd7b992c36026876b4d1fb3e63f02aa984ec.tar.gz
opensim-SC-7352bd7b992c36026876b4d1fb3e63f02aa984ec.tar.bz2
opensim-SC-7352bd7b992c36026876b4d1fb3e63f02aa984ec.tar.xz
* Change archiver 'textures' dir back to 'assets'
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Archiver')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs2
4 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs
index 517a79e..872eb77 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
35 /// <summary> 35 /// <summary>
36 /// Path for the assets held in an archive 36 /// Path for the assets held in an archive
37 /// </summary> 37 /// </summary>
38 public static readonly string TEXTURES_PATH = "textures/"; 38 public static readonly string ASSETS_PATH = "textures/";
39 39
40 /// <summary> 40 /// <summary>
41 /// Extension used for texture assets in archive 41 /// Extension used for texture assets in archive
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
index f92e955..6e53f28 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
81 string xml = m_asciiEncoding.GetString(data); 81 string xml = m_asciiEncoding.GetString(data);
82 dearchiver.AddAssetMetadata(xml); 82 dearchiver.AddAssetMetadata(xml);
83 } 83 }
84 else if (filePath.StartsWith(ArchiveConstants.TEXTURES_PATH)) 84 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
85 { 85 {
86 dearchiver.AddAssetData(filePath, data); 86 dearchiver.AddAssetData(filePath, data);
87 } 87 }
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs
index 12e1f81..ed5f0e7 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs
@@ -58,9 +58,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
58 /// <param name="archive"></param> 58 /// <param name="archive"></param>
59 public void Archive(TarArchiveWriter archive) 59 public void Archive(TarArchiveWriter archive)
60 { 60 {
61 // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
62 //archive.AddDir("assets");
63
64 WriteMetadata(archive); 61 WriteMetadata(archive);
65 WriteData(archive); 62 WriteData(archive);
66 } 63 }
@@ -111,12 +108,15 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
111 /// <param name="archive"></param> 108 /// <param name="archive"></param>
112 protected void WriteData(TarArchiveWriter archive) 109 protected void WriteData(TarArchiveWriter archive)
113 { 110 {
111 // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
112 //archive.AddDir("assets");
113
114 foreach (LLUUID uuid in m_assets.Keys) 114 foreach (LLUUID uuid in m_assets.Keys)
115 { 115 {
116 if (m_assets[uuid] != null) 116 if (m_assets[uuid] != null)
117 { 117 {
118 archive.AddFile( 118 archive.AddFile(
119 ArchiveConstants.TEXTURES_PATH + uuid.ToString() + ArchiveConstants.TEXTURE_EXTENSION, 119 ArchiveConstants.ASSETS_PATH + uuid.ToString() + ArchiveConstants.TEXTURE_EXTENSION,
120 m_assets[uuid].Data); 120 m_assets[uuid].Data);
121 } 121 }
122 else 122 else
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs
index 1c5b535..9e63ccf 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
144 protected void ResolveAssetData(string assetPath, byte[] data) 144 protected void ResolveAssetData(string assetPath, byte[] data)
145 { 145 {
146 // Right now we're nastily obtaining the lluuid from the filename 146 // Right now we're nastily obtaining the lluuid from the filename
147 string filename = assetPath.Remove(0, ArchiveConstants.TEXTURES_PATH.Length); 147 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length);
148 148
149 if (m_metadata.ContainsKey(filename)) 149 if (m_metadata.ContainsKey(filename))
150 { 150 {