From 0d9591bf3562955a39c57dd289d0cc0bb0ba85a3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 1 Jan 2010 22:51:00 +0000 Subject: Prevent the creation of duplicate inventory folders in the case of a login database issue. Now the login will instaead fail later. --- OpenSim/Services/InventoryService/InventoryService.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/InventoryService') diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index d4da4d3..95007f1 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using System.Reflection; using log4net; @@ -102,7 +103,17 @@ namespace OpenSim.Services.InventoryService // See IInventoryServices public bool CreateUserInventory(UUID user) { - InventoryFolderBase existingRootFolder = GetRootFolder(user); + InventoryFolderBase existingRootFolder; + try + { + existingRootFolder = GetRootFolder(user); + } + catch (Exception e) + { + // Munch the exception, it has already been reported + // + return false; + } if (null != existingRootFolder) { -- cgit v1.1