aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/FileAssetClient.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Framework/Communications/Cache/FileAssetClient.cs
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* 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.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/FileAssetClient.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/FileAssetClient.cs16
1 files changed, 10 insertions, 6 deletions
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
18 } 18 }
19 public override void StoreAsset(AssetBase asset) 19 public override void StoreAsset(AssetBase asset)
20 { 20 {
21 string cdir = m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0] 21 byte[] idBytes = asset.FullID.Guid.ToByteArray();
22 + Path.DirectorySeparatorChar + asset.FullID.Data[1];
23 22
24 if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0])) 23 string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0]
25 Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0]); 24 + Path.DirectorySeparatorChar + idBytes[1];
25
26 if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + idBytes[0]))
27 Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + idBytes[0]);
26 28
27 if (!Directory.Exists(cdir)) 29 if (!Directory.Exists(cdir))
28 Directory.CreateDirectory(cdir); 30 Directory.CreateDirectory(cdir);
@@ -41,8 +43,10 @@ namespace OpenSim.Framework.Communications.Cache
41 43
42 protected override AssetBase GetAsset(AssetRequest req) 44 protected override AssetBase GetAsset(AssetRequest req)
43 { 45 {
44 string cdir = m_dir + Path.DirectorySeparatorChar + req.AssetID.Data[0] 46 byte[] idBytes = req.AssetID.Guid.ToByteArray();
45 + Path.DirectorySeparatorChar + req.AssetID.Data[1]; 47
48 string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0]
49 + Path.DirectorySeparatorChar + idBytes[1];
46 if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml")) 50 if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml"))
47 { 51 {
48 FileStream x = File.OpenRead(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml"); 52 FileStream x = File.OpenRead(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml");