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 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs') 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() -- cgit v1.1