aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-08-08 17:29:37 +0000
committerMW2007-08-08 17:29:37 +0000
commit369fb2e623acae2ad6ef0508a665d7622a39217d (patch)
tree94b26323b6e457b46c4ff45a596d6675fefae708
parentThe startup set of assets in the local asset server can now be set from a xml... (diff)
downloadopensim-SC-369fb2e623acae2ad6ef0508a665d7622a39217d.zip
opensim-SC-369fb2e623acae2ad6ef0508a665d7622a39217d.tar.gz
opensim-SC-369fb2e623acae2ad6ef0508a665d7622a39217d.tar.bz2
opensim-SC-369fb2e623acae2ad6ef0508a665d7622a39217d.tar.xz
Added checks to the last commit to make sure the xml files exist before it tries to load them.
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs7
-rw-r--r--OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs3
2 files changed, 8 insertions, 2 deletions
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
36 this.CreateLibraryItems(); 36 this.CreateLibraryItems();
37 37
38 string filePath = Path.Combine(Util.configDir(), "OpenSimLibrary.xml"); 38 string filePath = Path.Combine(Util.configDir(), "OpenSimLibrary.xml");
39 XmlConfigSource source = new XmlConfigSource(filePath); 39 if (File.Exists(filePath))
40 this.ReadItemsFromFile(source); 40 {
41 XmlConfigSource source = new XmlConfigSource(filePath);
42 this.ReadItemsFromFile(source);
43 }
41 } 44 }
42 45
43 private void CreateLibraryItems() 46 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
361 */ 361 */
362 362
363 string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml"); 363 string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml");
364 if(File.Exists(filePath))
365 {
364 XmlConfigSource source = new XmlConfigSource(filePath); 366 XmlConfigSource source = new XmlConfigSource(filePath);
365 ReadAssetDetails(source); 367 ReadAssetDetails(source);
368 }
366 } 369 }
367 370
368 protected void ReadAssetDetails(IConfigSource source) 371 protected void ReadAssetDetails(IConfigSource source)