aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2020-09-09 05:00:36 +1000
committeronefang2020-09-09 05:00:36 +1000
commitf246febe1f2c7385451d3b3ad2f9f99575bb73b0 (patch)
treede89ef1fa0daf6932a35a4f925190e33b943c45b
parentWhitespace-- (diff)
downloadopensim-SC-f246febe1f2c7385451d3b3ad2f9f99575bb73b0.zip
opensim-SC-f246febe1f2c7385451d3b3ad2f9f99575bb73b0.tar.gz
opensim-SC-f246febe1f2c7385451d3b3ad2f9f99575bb73b0.tar.bz2
opensim-SC-f246febe1f2c7385451d3b3ad2f9f99575bb73b0.tar.xz
OpenSim changed the way FSAssets directory structure works by default, sort that out.
Otherwise updating from 0.8 to 0.9 with FSAssets will fail to find new assets.
-rw-r--r--OpenSim/Services/FSAssetService/FSAssetService.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Services/FSAssetService/FSAssetService.cs b/OpenSim/Services/FSAssetService/FSAssetService.cs
index d1a59d1..f130c20 100644
--- a/OpenSim/Services/FSAssetService/FSAssetService.cs
+++ b/OpenSim/Services/FSAssetService/FSAssetService.cs
@@ -185,7 +185,18 @@ namespace OpenSim.Services.FSAssetService
185 throw new Exception("Configuration error"); 185 throw new Exception("Configuration error");
186 } 186 }
187 187
188 // OSGrid format is /3/3/, OpenSims default format is /2/2/2/4/. Try to figure out which we have.
189 List<string> dirs = new List<string>(Directory.EnumerateDirectories(m_FSBase));
190 foreach (var dir in dirs)
191 {
192 if (3 == dir.Substring(dir.LastIndexOf(Path.DirectorySeparatorChar) + 1).Length)
193 {
194 m_useOsgridFormat = true;
195 break;
196 }
197 }
188 m_useOsgridFormat = assetConfig.GetBoolean("UseOsgridFormat", m_useOsgridFormat); 198 m_useOsgridFormat = assetConfig.GetBoolean("UseOsgridFormat", m_useOsgridFormat);
199 m_log.InfoFormat("[FSASSETS]: UseOsgridFormat is {0}", m_useOsgridFormat);
189 200
190 // Default is to show stats to retain original behaviour 201 // Default is to show stats to retain original behaviour
191 m_showStats = assetConfig.GetBoolean("ShowConsoleStats", m_showStats); 202 m_showStats = assetConfig.GetBoolean("ShowConsoleStats", m_showStats);