* Change archiver 'textures' dir back to 'assets'

0.6.0-stable
Justin Clarke Casey 2008-06-05 00:01:38 +00:00
parent 168f9367cb
commit 7352bd7b99
4 changed files with 7 additions and 7 deletions

View File

@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
/// <summary>
/// Path for the assets held in an archive
/// </summary>
public static readonly string TEXTURES_PATH = "textures/";
public static readonly string ASSETS_PATH = "textures/";
/// <summary>
/// Extension used for texture assets in archive

View File

@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
string xml = m_asciiEncoding.GetString(data);
dearchiver.AddAssetMetadata(xml);
}
else if (filePath.StartsWith(ArchiveConstants.TEXTURES_PATH))
else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
{
dearchiver.AddAssetData(filePath, data);
}

View File

@ -58,9 +58,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
/// <param name="archive"></param>
public void Archive(TarArchiveWriter archive)
{
// It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
//archive.AddDir("assets");
WriteMetadata(archive);
WriteData(archive);
}
@ -111,12 +108,15 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
/// <param name="archive"></param>
protected void WriteData(TarArchiveWriter archive)
{
// It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
//archive.AddDir("assets");
foreach (LLUUID uuid in m_assets.Keys)
{
if (m_assets[uuid] != null)
{
archive.AddFile(
ArchiveConstants.TEXTURES_PATH + uuid.ToString() + ArchiveConstants.TEXTURE_EXTENSION,
ArchiveConstants.ASSETS_PATH + uuid.ToString() + ArchiveConstants.TEXTURE_EXTENSION,
m_assets[uuid].Data);
}
else

View File

@ -144,7 +144,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
protected void ResolveAssetData(string assetPath, byte[] data)
{
// Right now we're nastily obtaining the lluuid from the filename
string filename = assetPath.Remove(0, ArchiveConstants.TEXTURES_PATH.Length);
string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length);
if (m_metadata.ContainsKey(filename))
{