Move ArchiveConstants to OpenSim.Framework.Archive
- move a couple constants from InventoryArchiveConstants to ArchiveConstants, now only one of these is needed - change InventoryArchiveConstants references to ArchiveConstants - remove InventoryArchive AssetInventoryServer plugin dependency on OpenSim.Region.CodeModules - trim trailing whitespace0.6.5-rc1
parent
f784620780
commit
7b2977d625
|
@ -28,7 +28,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.World.Archiver
|
namespace OpenSim.Framework.Archive
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constants for the archiving module
|
/// Constants for the archiving module
|
||||||
|
@ -45,6 +45,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly string ASSETS_PATH = "assets/";
|
public static readonly string ASSETS_PATH = "assets/";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Path for the inventory data
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string INVENTORY_PATH = "inventory/";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Path for the prims file
|
/// Path for the prims file
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -65,6 +70,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly string ASSET_EXTENSION_SEPARATOR = "_";
|
public static readonly string ASSET_EXTENSION_SEPARATOR = "_";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to separate components in an inventory node name
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string INVENTORY_NODE_NAME_COMPONENT_SEPARATOR = "__";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Extensions used for asset types in the archive
|
/// Extensions used for asset types in the archive
|
||||||
/// </summary>
|
/// </summary>
|
|
@ -35,7 +35,6 @@ using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Archive;
|
using OpenSim.Framework.Archive;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
namespace OpenSim.Grid.AssetInventoryServer.Plugins
|
namespace OpenSim.Grid.AssetInventoryServer.Plugins
|
||||||
|
@ -146,7 +145,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
|
||||||
MemoryStream ms = new MemoryStream();
|
MemoryStream ms = new MemoryStream();
|
||||||
GZipStream gzs = new GZipStream(ms, CompressionMode.Compress, true);
|
GZipStream gzs = new GZipStream(ms, CompressionMode.Compress, true);
|
||||||
TarArchiveWriter archive = new TarArchiveWriter(gzs);
|
TarArchiveWriter archive = new TarArchiveWriter(gzs);
|
||||||
WriteInventoryFolderToArchive(archive, rootFolder, InventoryArchiveConstants.INVENTORY_PATH);
|
WriteInventoryFolderToArchive(archive, rootFolder, ArchiveConstants.INVENTORY_PATH);
|
||||||
|
|
||||||
archive.Close();
|
archive.Close();
|
||||||
|
|
||||||
|
@ -181,7 +180,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
|
||||||
|
|
||||||
private static void WriteInventoryFolderToArchive(TarArchiveWriter archive, InventoryFolderWithChildren folder, string path)
|
private static void WriteInventoryFolderToArchive(TarArchiveWriter archive, InventoryFolderWithChildren folder, string path)
|
||||||
{
|
{
|
||||||
path += string.Format("{0}{1}{2}/", folder.Name, InventoryArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, folder.ID);
|
path += string.Format("{0}{1}{2}/", folder.Name, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, folder.ID);
|
||||||
archive.WriteDir(path);
|
archive.WriteDir(path);
|
||||||
|
|
||||||
foreach (InventoryNodeBase inventoryNode in folder.Children.Values)
|
foreach (InventoryNodeBase inventoryNode in folder.Children.Values)
|
||||||
|
|
|
@ -1,113 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSim Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using OpenMetaverse;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Constants for the inventory archiving module
|
|
||||||
/// </summary>
|
|
||||||
public class InventoryArchiveConstants
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Path for the inventory data
|
|
||||||
/// </summary>
|
|
||||||
public static readonly string INVENTORY_PATH = "inventory/";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Path for the assets held in an archive
|
|
||||||
/// </summary>
|
|
||||||
public static readonly string ASSETS_PATH = "assets/";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The character the separates the uuid from extension information in an archived asset filename
|
|
||||||
/// </summary>
|
|
||||||
public static readonly string ASSET_EXTENSION_SEPARATOR = "_";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to separate components in an inventory node name
|
|
||||||
/// </summary>
|
|
||||||
public static readonly string INVENTORY_NODE_NAME_COMPONENT_SEPARATOR = "__";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Extensions used for asset types in the archive
|
|
||||||
/// </summary>
|
|
||||||
public static readonly IDictionary<sbyte, string> ASSET_TYPE_TO_EXTENSION = new Dictionary<sbyte, string>();
|
|
||||||
public static readonly IDictionary<string, sbyte> EXTENSION_TO_ASSET_TYPE = new Dictionary<string, sbyte>();
|
|
||||||
|
|
||||||
static InventoryArchiveConstants()
|
|
||||||
{
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Animation] = ASSET_EXTENSION_SEPARATOR + "animation.bvh";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Bodypart] = ASSET_EXTENSION_SEPARATOR + "bodypart.txt";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.CallingCard] = ASSET_EXTENSION_SEPARATOR + "callingcard.txt";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Clothing] = ASSET_EXTENSION_SEPARATOR + "clothing.txt";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Folder] = ASSET_EXTENSION_SEPARATOR + "folder.txt"; // Not sure if we'll ever see this
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Gesture] = ASSET_EXTENSION_SEPARATOR + "gesture.txt";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.ImageJPEG] = ASSET_EXTENSION_SEPARATOR + "image.jpg";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.ImageTGA] = ASSET_EXTENSION_SEPARATOR + "image.tga";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Landmark] = ASSET_EXTENSION_SEPARATOR + "landmark.txt";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LostAndFoundFolder] = ASSET_EXTENSION_SEPARATOR + "lostandfoundfolder.txt"; // Not sure if we'll ever see this
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LSLBytecode] = ASSET_EXTENSION_SEPARATOR + "bytecode.lso";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LSLText] = ASSET_EXTENSION_SEPARATOR + "script.lsl";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ASSET_EXTENSION_SEPARATOR + "notecard.txt";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ASSET_EXTENSION_SEPARATOR + "object.xml";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"; // Not sure if we'll ever see this
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ASSET_EXTENSION_SEPARATOR + "simstate.bin"; // Not sure if we'll ever see this
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SnapshotFolder] = ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"; // Not sure if we'll ever see this
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ASSET_EXTENSION_SEPARATOR + "sound.ogg";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SoundWAV] = ASSET_EXTENSION_SEPARATOR + "sound.wav";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Texture] = ASSET_EXTENSION_SEPARATOR + "texture.jp2";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.TextureTGA] = ASSET_EXTENSION_SEPARATOR + "texture.tga";
|
|
||||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.TrashFolder] = ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"; // Not sure if we'll ever see this
|
|
||||||
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "animation.bvh"] = (sbyte)AssetType.Animation;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "bodypart.txt"] = (sbyte)AssetType.Bodypart;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "callingcard.txt"] = (sbyte)AssetType.CallingCard;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "clothing.txt"] = (sbyte)AssetType.Clothing;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "folder.txt"] = (sbyte)AssetType.Folder;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "gesture.txt"] = (sbyte)AssetType.Gesture;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "image.jpg"] = (sbyte)AssetType.ImageJPEG;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "image.tga"] = (sbyte)AssetType.ImageTGA;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "landmark.txt"] = (sbyte)AssetType.Landmark;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "lostandfoundfolder.txt"] = (sbyte)AssetType.LostAndFoundFolder;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "bytecode.lso"] = (sbyte)AssetType.LSLBytecode;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "script.lsl"] = (sbyte)AssetType.LSLText;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "notecard.txt"] = (sbyte)AssetType.Notecard;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "object.xml"] = (sbyte)AssetType.Object;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"] = (sbyte)AssetType.RootFolder;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "simstate.bin"] = (sbyte)AssetType.Simstate;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"] = (sbyte)AssetType.SnapshotFolder;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.ogg"] = (sbyte)AssetType.Sound;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.wav"] = (sbyte)AssetType.SoundWAV;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "texture.jp2"] = (sbyte)AssetType.Texture;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "texture.tga"] = (sbyte)AssetType.TextureTGA;
|
|
||||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"] = (sbyte)AssetType.TrashFolder;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -204,14 +204,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[INVENTORY ARCHIVER]: Ignoring directory entry {0}", filePath);
|
m_log.WarnFormat("[INVENTORY ARCHIVER]: Ignoring directory entry {0}", filePath);
|
||||||
}
|
}
|
||||||
else if (filePath.StartsWith(InventoryArchiveConstants.ASSETS_PATH))
|
else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
|
||||||
{
|
{
|
||||||
if (LoadAsset(filePath, data))
|
if (LoadAsset(filePath, data))
|
||||||
successfulAssetRestores++;
|
successfulAssetRestores++;
|
||||||
else
|
else
|
||||||
failedAssetRestores++;
|
failedAssetRestores++;
|
||||||
}
|
}
|
||||||
else if (filePath.StartsWith(InventoryArchiveConstants.INVENTORY_PATH))
|
else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH))
|
||||||
{
|
{
|
||||||
InventoryItemBase item = LoadInvItem(m_asciiEncoding.GetString(data));
|
InventoryItemBase item = LoadInvItem(m_asciiEncoding.GetString(data));
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
item.Creator = m_userInfo.UserProfile.ID;
|
item.Creator = m_userInfo.UserProfile.ID;
|
||||||
item.Owner = m_userInfo.UserProfile.ID;
|
item.Owner = m_userInfo.UserProfile.ID;
|
||||||
|
|
||||||
string fsPath = filePath.Substring(InventoryArchiveConstants.INVENTORY_PATH.Length);
|
string fsPath = filePath.Substring(ArchiveConstants.INVENTORY_PATH.Length);
|
||||||
fsPath = fsPath.Remove(fsPath.LastIndexOf("/") + 1);
|
fsPath = fsPath.Remove(fsPath.LastIndexOf("/") + 1);
|
||||||
string originalFsPath = fsPath;
|
string originalFsPath = fsPath;
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
int identicalNameIdentifierIndex
|
int identicalNameIdentifierIndex
|
||||||
= rawDirsToCreate[i].LastIndexOf(
|
= rawDirsToCreate[i].LastIndexOf(
|
||||||
InventoryArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR);
|
ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR);
|
||||||
string folderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex);
|
string folderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex);
|
||||||
|
|
||||||
UUID newFolderId = UUID.Random();
|
UUID newFolderId = UUID.Random();
|
||||||
|
@ -353,14 +353,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
{
|
{
|
||||||
//IRegionSerialiser serialiser = scene.RequestModuleInterface<IRegionSerialiser>();
|
//IRegionSerialiser serialiser = scene.RequestModuleInterface<IRegionSerialiser>();
|
||||||
// Right now we're nastily obtaining the UUID from the filename
|
// Right now we're nastily obtaining the UUID from the filename
|
||||||
string filename = assetPath.Remove(0, InventoryArchiveConstants.ASSETS_PATH.Length);
|
string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length);
|
||||||
int i = filename.LastIndexOf(InventoryArchiveConstants.ASSET_EXTENSION_SEPARATOR);
|
int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR);
|
||||||
|
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[INVENTORY ARCHIVER]: Could not find extension information in asset path {0} since it's missing the separator {1}. Skipping",
|
"[INVENTORY ARCHIVER]: Could not find extension information in asset path {0} since it's missing the separator {1}. Skipping",
|
||||||
assetPath, InventoryArchiveConstants.ASSET_EXTENSION_SEPARATOR);
|
assetPath, ArchiveConstants.ASSET_EXTENSION_SEPARATOR);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -368,9 +368,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
string extension = filename.Substring(i);
|
string extension = filename.Substring(i);
|
||||||
string uuid = filename.Remove(filename.Length - extension.Length);
|
string uuid = filename.Remove(filename.Length - extension.Length);
|
||||||
|
|
||||||
if (InventoryArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension))
|
if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension))
|
||||||
{
|
{
|
||||||
sbyte assetType = InventoryArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension];
|
sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension];
|
||||||
|
|
||||||
//m_log.DebugFormat("[INVENTORY ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType);
|
//m_log.DebugFormat("[INVENTORY ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType);
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
string.Format(
|
string.Format(
|
||||||
"{0}{1}{2}/",
|
"{0}{1}{2}/",
|
||||||
inventoryFolder.Name,
|
inventoryFolder.Name,
|
||||||
InventoryArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR,
|
ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR,
|
||||||
inventoryFolder.ID);
|
inventoryFolder.ID);
|
||||||
m_archive.WriteDir(path);
|
m_archive.WriteDir(path);
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
folder,
|
folder,
|
||||||
string.Format(
|
string.Format(
|
||||||
"{0}{1}{2}/",
|
"{0}{1}{2}/",
|
||||||
path, InventoryArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, folderNameNumber));
|
path, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, folderNameNumber));
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
inventoryFolder.Name, inventoryFolder.ID, m_invPath);
|
inventoryFolder.Name, inventoryFolder.ID, m_invPath);
|
||||||
|
|
||||||
//recurse through all dirs getting dirs and files
|
//recurse through all dirs getting dirs and files
|
||||||
SaveInvDir(inventoryFolder, InventoryArchiveConstants.INVENTORY_PATH);
|
SaveInvDir(inventoryFolder, ArchiveConstants.INVENTORY_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
new AssetsRequest(assetUuids.Keys, m_module.CommsManager.AssetCache, ReceivedAllAssets).Execute();
|
new AssetsRequest(assetUuids.Keys, m_module.CommsManager.AssetCache, ReceivedAllAssets).Execute();
|
||||||
|
|
|
@ -132,9 +132,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
//bool gotObject2File = false;
|
//bool gotObject2File = false;
|
||||||
string expectedObject1FilePath = string.Format(
|
string expectedObject1FilePath = string.Format(
|
||||||
"{0}{1}/{2}_{3}.xml",
|
"{0}{1}/{2}_{3}.xml",
|
||||||
InventoryArchiveConstants.INVENTORY_PATH,
|
ArchiveConstants.INVENTORY_PATH,
|
||||||
string.Format(
|
string.Format(
|
||||||
"Objects{0}{1}", InventoryArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, objectsFolder.ID),
|
"Objects{0}{1}", ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, objectsFolder.ID),
|
||||||
item1.Name,
|
item1.Name,
|
||||||
item1Id);
|
item1Id);
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
gotControlFile = true;
|
gotControlFile = true;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (filePath.StartsWith(InventoryArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml"))
|
if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml"))
|
||||||
{
|
{
|
||||||
//string fileName = filePath.Remove(0, "Objects/".Length);
|
//string fileName = filePath.Remove(0, "Objects/".Length);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ using System.Xml;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Archive;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.World.Archiver
|
namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
{
|
{
|
||||||
|
|
64
prebuild.xml
64
prebuild.xml
|
@ -118,6 +118,7 @@
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
|
||||||
<ReferencePath>../../../bin/</ReferencePath>
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
|
<Reference name="OpenMetaverse" />
|
||||||
<Reference name="System"/>
|
<Reference name="System"/>
|
||||||
<Reference name="log4net.dll"/>
|
<Reference name="log4net.dll"/>
|
||||||
|
|
||||||
|
@ -865,6 +866,36 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
<Project name="OpenSim.Grid.AssetInventoryServer.Plugins" path="OpenSim/Grid/AssetInventoryServer/Plugins" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../../../../bin/</ReferencePath>
|
||||||
|
<Reference name="System"/>
|
||||||
|
<Reference name="System.Xml"/>
|
||||||
|
<Reference name="System.Web"/>
|
||||||
|
<Reference name="OpenMetaverseTypes"/>
|
||||||
|
<Reference name="OpenMetaverse.StructuredData"/>
|
||||||
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="OpenSim.Framework.Archive"/>
|
||||||
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Grid.AssetInventoryServer" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="false" />
|
||||||
|
<Match path="Resources" pattern="*.addin.xml" buildAction="EmbeddedResource" recurse="true" />
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
<Project name="OpenSim.Grid.AssetInventoryServer.Plugins.Simple" path="OpenSim/Grid/AssetInventoryServer/Plugins/Simple" type="Library">
|
<Project name="OpenSim.Grid.AssetInventoryServer.Plugins.Simple" path="OpenSim/Grid/AssetInventoryServer/Plugins/Simple" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -1141,39 +1172,6 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
<Project name="OpenSim.Grid.AssetInventoryServer.Plugins" path="OpenSim/Grid/AssetInventoryServer/Plugins" type="Library">
|
|
||||||
<Configuration name="Debug">
|
|
||||||
<Options>
|
|
||||||
<OutputPath>../../../../bin/</OutputPath>
|
|
||||||
</Options>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration name="Release">
|
|
||||||
<Options>
|
|
||||||
<OutputPath>../../../../bin/</OutputPath>
|
|
||||||
</Options>
|
|
||||||
</Configuration>
|
|
||||||
|
|
||||||
<ReferencePath>../../../../bin/</ReferencePath>
|
|
||||||
<Reference name="System"/>
|
|
||||||
<Reference name="System.Xml"/>
|
|
||||||
<Reference name="System.Web"/>
|
|
||||||
<Reference name="OpenMetaverseTypes"/>
|
|
||||||
<Reference name="OpenMetaverse.StructuredData"/>
|
|
||||||
<Reference name="OpenSim.Framework"/>
|
|
||||||
<Reference name="OpenSim.Framework.Archive"/>
|
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
|
||||||
<Reference name="OpenSim.Grid.AssetInventoryServer" />
|
|
||||||
<Reference name="log4net"/>
|
|
||||||
|
|
||||||
<!-- Needed for InventoryArchiveConstants. Hopefully it can be moved to Framework or something so we don't depend on Region DLLs. -->
|
|
||||||
<Reference name="OpenSim.Region.CoreModules"/>
|
|
||||||
|
|
||||||
<Files>
|
|
||||||
<Match pattern="*.cs" recurse="false" />
|
|
||||||
<Match path="Resources" pattern="*.addin.xml" buildAction="EmbeddedResource" recurse="true" />
|
|
||||||
</Files>
|
|
||||||
</Project>
|
|
||||||
|
|
||||||
<Project name="OpenSim.Region.CoreModules.World.Terrain.DefaultEffects" path="OpenSim/Region/CoreModules/World/Terrain/DefaultEffects" type="Library">
|
<Project name="OpenSim.Region.CoreModules.World.Terrain.DefaultEffects" path="OpenSim/Region/CoreModules/World/Terrain/DefaultEffects" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
|
Loading…
Reference in New Issue