* Change single assets/ archiver directory to be textures/ instead
parent
afd59e862e
commit
4106b2a601
|
@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Path for the assets held in an archive
|
/// Path for the assets held in an archive
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly string ASSETS_PATH = "assets/";
|
public static readonly string TEXTURES_PATH = "textures/";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Extension used for texture assets in archive
|
/// Extension used for texture assets in archive
|
||||||
|
|
|
@ -75,10 +75,10 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
{
|
{
|
||||||
serializedPrims = m_asciiEncoding.GetString(data);
|
serializedPrims = m_asciiEncoding.GetString(data);
|
||||||
}
|
}
|
||||||
else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
|
else if (filePath.StartsWith(ArchiveConstants.TEXTURES_PATH))
|
||||||
{
|
{
|
||||||
// Right now we're nastily obtaining the lluuid from the filename
|
// Right now we're nastily obtaining the lluuid from the filename
|
||||||
string rawId = filePath.Remove(0, ArchiveConstants.ASSETS_PATH.Length);
|
string rawId = filePath.Remove(0, ArchiveConstants.TEXTURES_PATH.Length);
|
||||||
rawId = rawId.Remove(rawId.Length - ArchiveConstants.TEXTURE_EXTENSION.Length);
|
rawId = rawId.Remove(rawId.Length - ArchiveConstants.TEXTURE_EXTENSION.Length);
|
||||||
|
|
||||||
m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", rawId);
|
m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", rawId);
|
||||||
|
@ -86,8 +86,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
// Not preserving asset name or description as of yet
|
// Not preserving asset name or description as of yet
|
||||||
AssetBase asset = new AssetBase(new LLUUID(rawId), "imported name");
|
AssetBase asset = new AssetBase(new LLUUID(rawId), "imported name");
|
||||||
asset.Description = "imported description";
|
asset.Description = "imported description";
|
||||||
|
|
||||||
// Only importing textures right now
|
|
||||||
asset.Type = (sbyte)AssetType.Texture;
|
asset.Type = (sbyte)AssetType.Texture;
|
||||||
asset.InvType = (sbyte)InventoryType.Texture;
|
asset.InvType = (sbyte)InventoryType.Texture;
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
if (assets[uuid] != null)
|
if (assets[uuid] != null)
|
||||||
{
|
{
|
||||||
archive.AddFile(
|
archive.AddFile(
|
||||||
ArchiveConstants.ASSETS_PATH + uuid.ToString() + ArchiveConstants.TEXTURE_EXTENSION,
|
ArchiveConstants.TEXTURES_PATH + uuid.ToString() + ArchiveConstants.TEXTURE_EXTENSION,
|
||||||
assets[uuid].Data);
|
assets[uuid].Data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue