diff options
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 2b3ffd8..0d471d8 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -680,7 +680,7 @@ namespace OpenSim | |||
680 | 680 | ||
681 | string firstName = cmdparams[0]; | 681 | string firstName = cmdparams[0]; |
682 | string lastName = cmdparams[1]; | 682 | string lastName = cmdparams[1]; |
683 | //string invPath = cmdparams[2]; | 683 | string invPath = cmdparams[2]; |
684 | //string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME); | 684 | //string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME); |
685 | 685 | ||
686 | UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(firstName, lastName); | 686 | UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(firstName, lastName); |
@@ -695,7 +695,46 @@ namespace OpenSim | |||
695 | { | 695 | { |
696 | m_log.ErrorFormat("[CONSOLE]: Failed to find user info for {0} {1} {2}", firstName, lastName, userProfile.ID); | 696 | m_log.ErrorFormat("[CONSOLE]: Failed to find user info for {0} {1} {2}", firstName, lastName, userProfile.ID); |
697 | return; | 697 | return; |
698 | } | 698 | } |
699 | |||
700 | InventoryFolderImpl inventoryFolder = null; | ||
701 | |||
702 | if (userInfo.HasReceivedInventory) | ||
703 | { | ||
704 | if (invPath == InventoryFolderImpl.PATH_DELIMITER) | ||
705 | { | ||
706 | inventoryFolder = userInfo.RootFolder; | ||
707 | } | ||
708 | else | ||
709 | { | ||
710 | // Eliminate double slashes and any leading / on the path. This might be better done within InventoryFolderImpl | ||
711 | // itself (possibly at a small loss in efficiency). | ||
712 | string[] components | ||
713 | = invPath.Split(new string[] { InventoryFolderImpl.PATH_DELIMITER }, StringSplitOptions.RemoveEmptyEntries); | ||
714 | invPath = String.Empty; | ||
715 | foreach (string c in components) | ||
716 | { | ||
717 | invPath += c + InventoryFolderImpl.PATH_DELIMITER; | ||
718 | } | ||
719 | |||
720 | inventoryFolder = userInfo.RootFolder.FindFolderByPath(invPath); | ||
721 | } | ||
722 | } | ||
723 | else | ||
724 | { | ||
725 | m_log.ErrorFormat("[CONSOLE]: Have not yet received inventory info for user {0} {1} {2}", firstName, lastName, userProfile.ID); | ||
726 | return; | ||
727 | } | ||
728 | |||
729 | if (null == inventoryFolder) | ||
730 | { | ||
731 | m_log.ErrorFormat("[CONSOLE]: Could not find folder with path {0}", invPath); | ||
732 | return; | ||
733 | } | ||
734 | else | ||
735 | { | ||
736 | m_log.InfoFormat("[CONSOLE]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID, invPath); | ||
737 | } | ||
699 | } | 738 | } |
700 | 739 | ||
701 | /// <summary> | 740 | /// <summary> |