aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2009-07-29 17:21:36 +0000
committerMelanie Thielker2009-07-29 17:21:36 +0000
commitcbeebc209d47f9e2498cae8c25884282cb7f9aa2 (patch)
tree07a735c8f67e62b76c2bceba5eac9a435e71da13 /OpenSim/Region
parentPatch from Kai Ludwig: Fix prim drawing on maptile. (diff)
downloadopensim-SC_OLD-cbeebc209d47f9e2498cae8c25884282cb7f9aa2.zip
opensim-SC_OLD-cbeebc209d47f9e2498cae8c25884282cb7f9aa2.tar.gz
opensim-SC_OLD-cbeebc209d47f9e2498cae8c25884282cb7f9aa2.tar.bz2
opensim-SC_OLD-cbeebc209d47f9e2498cae8c25884282cb7f9aa2.tar.xz
Thank you, coyled, for a patch to change Flotsamcache path generation
to avoid directory overflow.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 35d726f..bcdcfab 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -94,7 +94,7 @@ namespace Flotsam.RegionModules.AssetCache
94 /// WaitOnInprogressTimeout = 3000 94 /// WaitOnInprogressTimeout = 3000
95 /// 95 ///
96 /// ; Number of tiers to use for cache directories (current valid range 1 to 3) 96 /// ; Number of tiers to use for cache directories (current valid range 1 to 3)
97 /// CacheDirectoryTiers = 2 97 /// CacheDirectoryTiers = 1
98 /// 98 ///
99 /// ; Number of letters per path tier, 1 will create 16 directories per tier, 2 - 256, 3 - 4096 and 4 - 65K 99 /// ; Number of letters per path tier, 1 will create 16 directories per tier, 2 - 256, 3 - 4096 and 4 - 65K
100 /// CacheDirectoryTierLength = 3 100 /// CacheDirectoryTierLength = 3
@@ -148,7 +148,7 @@ namespace Flotsam.RegionModules.AssetCache
148 private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.Zero; 148 private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.Zero;
149 149
150 private static int m_CacheDirectoryTiers = 1; 150 private static int m_CacheDirectoryTiers = 1;
151 private static int m_CacheDirectoryTierLen = 4; 151 private static int m_CacheDirectoryTierLen = 3;
152 private static int m_CacheWarnAt = 30000; 152 private static int m_CacheWarnAt = 30000;
153 153
154 private System.Timers.Timer m_CachCleanTimer = new System.Timers.Timer(); 154 private System.Timers.Timer m_CachCleanTimer = new System.Timers.Timer();
@@ -228,7 +228,7 @@ namespace Flotsam.RegionModules.AssetCache
228 m_CacheDirectoryTiers = 3; 228 m_CacheDirectoryTiers = 3;
229 } 229 }
230 230
231 m_CacheDirectoryTierLen = assetConfig.GetInt("CacheDirectoryTierLen", 1); 231 m_CacheDirectoryTierLen = assetConfig.GetInt("CacheDirectoryTierLength", 3);
232 if (m_CacheDirectoryTierLen < 1) 232 if (m_CacheDirectoryTierLen < 1)
233 { 233 {
234 m_CacheDirectoryTierLen = 1; 234 m_CacheDirectoryTierLen = 1;
@@ -507,7 +507,7 @@ namespace Flotsam.RegionModules.AssetCache
507 string path = m_CacheDirectory; 507 string path = m_CacheDirectory;
508 for (int p = 1; p <= m_CacheDirectoryTiers; p++) 508 for (int p = 1; p <= m_CacheDirectoryTiers; p++)
509 { 509 {
510 string pathPart = id.Substring(id.Length - (p * m_CacheDirectoryTierLen), m_CacheDirectoryTierLen); 510 string pathPart = id.Substring((p - 1) * m_CacheDirectoryTierLen, m_CacheDirectoryTierLen);
511 path = Path.Combine(path, pathPart); 511 path = Path.Combine(path, pathPart);
512 } 512 }
513 513