From 0837f6b78dbb93686ed3a3aca62a21566dfa8ccc Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 29 Oct 2007 14:37:08 +0000 Subject: [PATCH] fixed one bug (where the assets we read and created from the OpenSimAssetSet.xml file, weren't actually getting added to the database). This should make textures/assets work again with db4o, but still seems a problem with sqlite --- OpenSim/Framework/Communications/Cache/AssetServerBase.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 53efa162fb..74f0167dc9 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs @@ -163,6 +163,8 @@ namespace OpenSim.Framework.Communications.Cache public void ForEachXmlAsset(Action action) { + List assets = new List(); + // System.Console.WriteLine("trying loading asset into database"); string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml"); if (File.Exists(filePath)) { @@ -170,6 +172,7 @@ namespace OpenSim.Framework.Communications.Cache for (int i = 0; i < source.Configs.Count; i++) { + // System.Console.WriteLine("loading asset into database"); string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()); string name = source.Configs[i].GetString("name", ""); sbyte type = (sbyte)source.Configs[i].GetInt("assetType", 0); @@ -180,9 +183,10 @@ namespace OpenSim.Framework.Communications.Cache newAsset.Type = type; newAsset.InvType = invType; - + assets.Add(newAsset); } } + assets.ForEach(action); } } }