aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/FSAssetService
diff options
context:
space:
mode:
authoronefang2019-07-18 05:16:15 +1000
committeronefang2019-07-18 05:16:15 +1000
commit5e0fa2a7587ebf70482e32e4227813c9b820f484 (patch)
treed03e719f74feeab6c67635b437703485cd31bc72 /OpenSim/Services/FSAssetService
parentAttempt to render "[LLUDPSERVER]: Malformed data, cannot parse" into somethin... (diff)
downloadopensim-SC-5e0fa2a7587ebf70482e32e4227813c9b820f484.zip
opensim-SC-5e0fa2a7587ebf70482e32e4227813c9b820f484.tar.gz
opensim-SC-5e0fa2a7587ebf70482e32e4227813c9b820f484.tar.bz2
opensim-SC-5e0fa2a7587ebf70482e32e4227813c9b820f484.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.
Diffstat (limited to 'OpenSim/Services/FSAssetService')
-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 4d47589..27b04f7 100644
--- a/OpenSim/Services/FSAssetService/FSAssetService.cs
+++ b/OpenSim/Services/FSAssetService/FSAssetService.cs
@@ -186,7 +186,18 @@ namespace OpenSim.Services.FSAssetService
186 throw new Exception("Configuration error"); 186 throw new Exception("Configuration error");
187 } 187 }
188 188
189 // OSGrid format is /3/3/, OpenSims default format is /2/2/2/4/. Try to figure out which we have.
190 List<string> dirs = new List<string>(Directory.EnumerateDirectories(m_FSBase));
191 foreach (var dir in dirs)
192 {
193 if (3 == dir.Substring(dir.LastIndexOf(Path.DirectorySeparatorChar) + 1).Length)
194 {
195 m_useOsgridFormat = true;
196 break;
197 }
198 }
189 m_useOsgridFormat = assetConfig.GetBoolean("UseOsgridFormat", m_useOsgridFormat); 199 m_useOsgridFormat = assetConfig.GetBoolean("UseOsgridFormat", m_useOsgridFormat);
200 m_log.InfoFormat("[FSASSETS]: UseOsgridFormat is {0}", m_useOsgridFormat);
190 201
191 // Default is to show stats to retain original behaviour 202 // Default is to show stats to retain original behaviour
192 m_showStats = assetConfig.GetBoolean("ShowConsoleStats", m_showStats); 203 m_showStats = assetConfig.GetBoolean("ShowConsoleStats", m_showStats);