Added a -v|verbose option to save iar.

viewer-2-initial-appearance
Diva Canto 2011-01-08 16:17:00 -08:00
parent 9d9a170571
commit 35a2961ccd
2 changed files with 9 additions and 1 deletions

View File

@ -139,6 +139,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
protected void SaveInvItem(InventoryItemBase inventoryItem, string path, Dictionary<string, object> options, IUserAccountService userAccountService)
{
if (options.ContainsKey("verbose"))
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving item {0} with asset {1}", inventoryItem.ID, inventoryItem.AssetID);
string filename = path + CreateArchiveItemName(inventoryItem);
// Record the creator of this item for user record purposes (which might go away soon)
@ -162,6 +165,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
InventoryFolderBase inventoryFolder, string path, bool saveThisFolderItself,
Dictionary<string, object> options, IUserAccountService userAccountService)
{
if (options.ContainsKey("verbose"))
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving folder {0}", inventoryFolder.Name);
if (saveThisFolderItself)
{
path += CreateArchiveFolderName(inventoryFolder);

View File

@ -122,12 +122,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
scene.AddCommand(
this, "save iar",
"save iar [--p|-profile=<url>] <first> <last> <inventory path> <password> [<IAR path>]",
"save iar [--p|-profile=<url>] <first> <last> <inventory path> <password> [<IAR path>] [--v|-verbose]",
"Save user inventory archive (IAR).",
"<first> is the user's first name." + Environment.NewLine
+ "<last> is the user's last name." + Environment.NewLine
+ "<inventory path> is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine
+ "-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine
+ "-v|--verbose extra debug messages." + Environment.NewLine
+ "<IAR path> is the filesystem path at which to save the IAR."
+ string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
HandleSaveInvConsoleCommand);
@ -394,6 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
OptionSet ops = new OptionSet();
//ops.Add("v|version=", delegate(string v) { options["version"] = v; });
ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; });
List<string> mainParams = ops.Parse(cmdparams);