From 369fb2e623acae2ad6ef0508a665d7622a39217d Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 8 Aug 2007 17:29:37 +0000 Subject: Added checks to the last commit to make sure the xml files exist before it tries to load them. --- OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | 7 +++++-- OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index b214598..2eb59d2 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs @@ -36,8 +36,11 @@ namespace OpenSim.Framework.Communications.Caches this.CreateLibraryItems(); string filePath = Path.Combine(Util.configDir(), "OpenSimLibrary.xml"); - XmlConfigSource source = new XmlConfigSource(filePath); - this.ReadItemsFromFile(source); + if (File.Exists(filePath)) + { + XmlConfigSource source = new XmlConfigSource(filePath); + this.ReadItemsFromFile(source); + } } private void CreateLibraryItems() diff --git a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs index 17d2680..eecfcaf 100644 --- a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs +++ b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs @@ -361,8 +361,11 @@ namespace OpenSim.Region.GridInterfaces.Local */ string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml"); + if(File.Exists(filePath)) + { XmlConfigSource source = new XmlConfigSource(filePath); ReadAssetDetails(source); + } } protected void ReadAssetDetails(IConfigSource source) -- cgit v1.1