aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AssetLoader/Filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/AssetLoader/Filesystem')
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs14
1 files changed, 5 insertions, 9 deletions
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
index 6fe9fb4..9d0f697 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
@@ -86,12 +86,6 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
86 } 86 }
87 } 87 }
88 88
89 public void ForEachDefaultXmlAsset(Action<AssetBase> action)
90 {
91 string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml");
92
93 ForEachDefaultXmlAsset(assetSetFilename, action);
94 }
95 89
96 public void ForEachDefaultXmlAsset(string assetSetFilename, Action<AssetBase> action) 90 public void ForEachDefaultXmlAsset(string assetSetFilename, Action<AssetBase> action)
97 { 91 {
@@ -99,16 +93,18 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
99 if (File.Exists(assetSetFilename)) 93 if (File.Exists(assetSetFilename))
100 { 94 {
101 string assetSetPath = "ERROR"; 95 string assetSetPath = "ERROR";
102 96 string assetRootPath = "";
103 try 97 try
104 { 98 {
105 XmlConfigSource source = new XmlConfigSource(assetSetFilename); 99 XmlConfigSource source = new XmlConfigSource(assetSetFilename);
100 assetRootPath = Path.GetFullPath(source.SavePath);
101 assetRootPath = Path.GetDirectoryName(assetRootPath);
106 102
107 for (int i = 0; i < source.Configs.Count; i++) 103 for (int i = 0; i < source.Configs.Count; i++)
108 { 104 {
109 assetSetPath = source.Configs[i].GetString("file", String.Empty); 105 assetSetPath = source.Configs[i].GetString("file", String.Empty);
110 106
111 LoadXmlAssetSet(Path.Combine(Util.assetsDir(), assetSetPath), assets); 107 LoadXmlAssetSet(Path.Combine(assetRootPath, assetSetPath), assets);
112 } 108 }
113 } 109 }
114 catch (XmlException e) 110 catch (XmlException e)
@@ -118,7 +114,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
118 } 114 }
119 else 115 else
120 { 116 {
121 m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); 117 m_log.ErrorFormat("[ASSETS]: Asset set control file {0} does not exist! No assets loaded.", assetSetFilename);
122 } 118 }
123 119
124 assets.ForEach(action); 120 assets.ForEach(action);