diff options
author | Jeff Ames | 2008-05-16 01:22:11 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-16 01:22:11 +0000 |
commit | 65c5efe43b68700bad94076d4cd421160203c5de (patch) | |
tree | 589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | |
parent | Thank you very much, mjm for : (diff) | |
download | opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.zip opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2 opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs')
-rw-r--r-- | OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs index 945163c..7adcb4a 100644 --- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs +++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | |||
@@ -38,7 +38,7 @@ using Nini.Config; | |||
38 | /// Loads assets from the filesystem location. Not yet a plugin, though it should be. | 38 | /// Loads assets from the filesystem location. Not yet a plugin, though it should be. |
39 | /// </summary> | 39 | /// </summary> |
40 | namespace OpenSim.Framework.AssetLoader.Filesystem | 40 | namespace OpenSim.Framework.AssetLoader.Filesystem |
41 | { | 41 | { |
42 | public class AssetLoaderFileSystem : IAssetLoader | 42 | public class AssetLoaderFileSystem : IAssetLoader |
43 | { | 43 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -63,7 +63,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
63 | 63 | ||
64 | return asset; | 64 | return asset; |
65 | } | 65 | } |
66 | 66 | ||
67 | protected static void LoadAsset(AssetBase info, bool image, string path) | 67 | protected static void LoadAsset(AssetBase info, bool image, string path) |
68 | { | 68 | { |
69 | FileInfo fInfo = new FileInfo(path); | 69 | FileInfo fInfo = new FileInfo(path); |
@@ -77,7 +77,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
77 | info.Data = idata; | 77 | info.Data = idata; |
78 | //info.loaded=true; | 78 | //info.loaded=true; |
79 | } | 79 | } |
80 | 80 | ||
81 | public void ForEachDefaultXmlAsset(Action<AssetBase> action) | 81 | public void ForEachDefaultXmlAsset(Action<AssetBase> action) |
82 | { | 82 | { |
83 | string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml"); | 83 | string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml"); |
@@ -91,28 +91,28 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
91 | if (File.Exists(assetSetFilename)) | 91 | if (File.Exists(assetSetFilename)) |
92 | { | 92 | { |
93 | string assetSetPath = "ERROR"; | 93 | string assetSetPath = "ERROR"; |
94 | 94 | ||
95 | try | 95 | try |
96 | { | 96 | { |
97 | XmlConfigSource source = new XmlConfigSource(assetSetFilename); | 97 | XmlConfigSource source = new XmlConfigSource(assetSetFilename); |
98 | 98 | ||
99 | for (int i = 0; i < source.Configs.Count; i++) | 99 | for (int i = 0; i < source.Configs.Count; i++) |
100 | { | 100 | { |
101 | assetSetPath = source.Configs[i].GetString("file", String.Empty); | 101 | assetSetPath = source.Configs[i].GetString("file", String.Empty); |
102 | 102 | ||
103 | LoadXmlAssetSet(Path.Combine(Util.assetsDir(), assetSetPath), assets); | 103 | LoadXmlAssetSet(Path.Combine(Util.assetsDir(), assetSetPath), assets); |
104 | } | 104 | } |
105 | } | 105 | } |
106 | catch (XmlException e) | 106 | catch (XmlException e) |
107 | { | 107 | { |
108 | m_log.ErrorFormat("[ASSETS]: Error loading {0} : {1}", assetSetPath, e); | 108 | m_log.ErrorFormat("[ASSETS]: Error loading {0} : {1}", assetSetPath, e); |
109 | } | 109 | } |
110 | } | 110 | } |
111 | else | 111 | else |
112 | { | 112 | { |
113 | m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); | 113 | m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); |
114 | } | 114 | } |
115 | 115 | ||
116 | assets.ForEach(action); | 116 | assets.ForEach(action); |
117 | } | 117 | } |
118 | 118 | ||
@@ -124,7 +124,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
124 | protected static void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets) | 124 | protected static void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets) |
125 | { | 125 | { |
126 | m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath); | 126 | m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath); |
127 | 127 | ||
128 | if (File.Exists(assetSetPath)) | 128 | if (File.Exists(assetSetPath)) |
129 | { | 129 | { |
130 | try | 130 | try |
@@ -156,6 +156,6 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
156 | { | 156 | { |
157 | m_log.ErrorFormat("[ASSETS]: Asset set file {0} does not exist!", assetSetPath); | 157 | m_log.ErrorFormat("[ASSETS]: Asset set file {0} does not exist!", assetSetPath); |
158 | } | 158 | } |
159 | } | 159 | } |
160 | } | 160 | } |
161 | } | 161 | } |