Addresses mantis #5360: CreatorData was being written as long as it wasn't null. This made iars backwards incompatible when some items had non-null foreign creators. This patch adds an explicit option (-c) to preserve foreign creator information.

0.7.1-dev
Diva Canto 2011-02-03 04:07:36 -08:00
parent 4f7cf491e6
commit 8fdc810a23
2 changed files with 3 additions and 1 deletions

View File

@ -303,7 +303,7 @@ namespace OpenSim.Framework.Serialization.External
writer.WriteStartElement("GroupOwned");
writer.WriteString(inventoryItem.GroupOwned.ToString());
writer.WriteEndElement();
if (inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty)
if (options.ContainsKey("creators") && inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty)
writer.WriteElementString("CreatorData", inventoryItem.CreatorData);
else if (options.ContainsKey("profile"))
{

View File

@ -128,6 +128,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
+ "<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
+ "-c|--creators preserves information about foreign creators." + 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),
@ -396,6 +397,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
//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; });
ops.Add("c|creators", delegate(string v) { options["creators"] = v; });
List<string> mainParams = ops.Parse(cmdparams);