From 7d89e122930be39e84a6d174548fa2d12ac0484a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 6 Sep 2008 07:52:41 +0000 Subject: * This is the fabled LibOMV update with all of the libOMV types from JHurliman * This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke. --- .../Framework/Communications/Cache/FileAssetClient.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache/FileAssetClient.cs') diff --git a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs index 3c74d4d..e793feb 100644 --- a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs @@ -18,11 +18,13 @@ namespace OpenSim.Framework.Communications.Cache } public override void StoreAsset(AssetBase asset) { - string cdir = m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0] - + Path.DirectorySeparatorChar + asset.FullID.Data[1]; + byte[] idBytes = asset.FullID.Guid.ToByteArray(); - if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0])) - Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0]); + string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0] + + Path.DirectorySeparatorChar + idBytes[1]; + + if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + idBytes[0])) + Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + idBytes[0]); if (!Directory.Exists(cdir)) Directory.CreateDirectory(cdir); @@ -41,8 +43,10 @@ namespace OpenSim.Framework.Communications.Cache protected override AssetBase GetAsset(AssetRequest req) { - string cdir = m_dir + Path.DirectorySeparatorChar + req.AssetID.Data[0] - + Path.DirectorySeparatorChar + req.AssetID.Data[1]; + byte[] idBytes = req.AssetID.Guid.ToByteArray(); + + string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0] + + Path.DirectorySeparatorChar + idBytes[1]; if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml")) { FileStream x = File.OpenRead(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml"); -- cgit v1.1