From 47e6d714b9924d2d8845d501b246a2423feba368 Mon Sep 17 00:00:00 2001
From: onefang
Date: Wed, 7 Jul 2021 13:56:29 +1000
Subject: If no file given for IARs, use users name and put it in the usual
backups directory.
---
.../Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index c74dc32..28a442d 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
///
/// The file to load and save inventory if no filename has been specified
///
- protected const string DEFAULT_INV_BACKUP_FILENAME = "user-inventory.iar";
+ protected const string DEFAULT_INV_BACKUP_FILENAME = "../../backups/";
///
/// Pending save and load completions initiated from the console
@@ -123,7 +123,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
+ " is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine
+ " is the user's password." + Environment.NewLine
+ " is the filesystem path or URI from which to load the IAR."
- + string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
+ + string.Format(" If this is not given then the filename based on the users name in the {0} directory is used", DEFAULT_INV_BACKUP_FILENAME),
HandleLoadInvConsoleCommand);
scene.AddCommand(
@@ -134,7 +134,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
+ " is the user's last name.\n"
+ " is the path inside the user's inventory for the folder/item to be saved.\n"
+ " 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.\n", DEFAULT_INV_BACKUP_FILENAME)
+ + string.Format(" If this is not given then the the filename based on the users name in the {0} directory is used.\n", DEFAULT_INV_BACKUP_FILENAME)
+ "-h|--home= adds the url of the profile service to the saved user information.\n"
+ "-c|--creators preserves information about foreign creators.\n"
+ "-e|--exclude= don't save the inventory item in archive" + Environment.NewLine
@@ -420,7 +420,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
string lastName = mainParams[3];
string invPath = mainParams[4];
string pass = mainParams[5];
- string loadPath = (mainParams.Count > 6 ? mainParams[6] : DEFAULT_INV_BACKUP_FILENAME);
+ string loadPath = (mainParams.Count > 6 ? mainParams[6] : DEFAULT_INV_BACKUP_FILENAME + firstName + "_" + lastName + ".IAR");
m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Loading archive {0} to inventory path {1} for {2} {3}",
@@ -485,7 +485,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
string lastName = mainParams[3];
string invPath = mainParams[4];
string pass = mainParams[5];
- string savePath = (mainParams.Count > 6 ? mainParams[6] : DEFAULT_INV_BACKUP_FILENAME);
+ string savePath = (mainParams.Count > 6 ? mainParams[6] : DEFAULT_INV_BACKUP_FILENAME + firstName + "_" + lastName + ".IAR");
m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}",
--
cgit v1.1