From e8d501d75074b3b8c3b01778afafb84c5a48291d Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 7 Nov 2016 12:47:38 +1000 Subject: More caches directory fixes, including moving console history there. --- OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs | 2 +- OpenSim/Framework/Console/LocalConsole.cs | 2 +- OpenSim/Server/Handlers/BakedTextures/XBakes.cs | 4 ++-- OpenSim/Services/GridService/HypergridLinker.cs | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs index 130a523..ea95696 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs @@ -68,7 +68,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions } string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); -//// Causes hangs with the actual .ini files. +//// Causes hangs with the actual .ini files if they are in the same place. //// string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); // Create an empty Regions.ini if there are no existing config files. diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index 28293c0..d8f8ecc 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs @@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", "OpenSimConsoleHistory.txt"); int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100); - m_historyPath = Path.GetFullPath(Path.Combine(Util.configDir(), m_historyFile)); + m_historyPath = Path.GetFullPath(Path.Combine("../caches", m_historyFile)); m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1}", m_historySize, m_historyPath); if (File.Exists(m_historyPath)) diff --git a/OpenSim/Server/Handlers/BakedTextures/XBakes.cs b/OpenSim/Server/Handlers/BakedTextures/XBakes.cs index a63c9a1..abcda62 100644 --- a/OpenSim/Server/Handlers/BakedTextures/XBakes.cs +++ b/OpenSim/Server/Handlers/BakedTextures/XBakes.cs @@ -70,9 +70,9 @@ namespace OpenSim.Server.Handlers.BakedTextures m_FSBase = assetConfig.GetString("BaseDirectory", String.Empty); if (m_FSBase == String.Empty) { - m_FSBase = "bakes"; + m_FSBase = "bakes"; } - m_FSBase = "../../caches/" + m_FSBase; + m_FSBase = "../caches/" + m_FSBase; m_log.Info("[BAKES]: XBakes service enabled"); } diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 4df41cf..aebbf7c 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -119,7 +119,8 @@ namespace OpenSim.Services.GridService if (scope != string.Empty) UUID.TryParse(scope, out m_ScopeID); - m_MapTileDirectory = "../caches/" + gridConfig.GetString("MapTileDirectory", "maptiles"); +// TODO OpenSim is crazy, this is called from Robust and OpenSim, Robust needs the ../caches bit, OpenSim somehow adds a path already. I can't tell why. So strip the path. + m_MapTileDirectory = "../caches/" + Path.GetFileName(gridConfig.GetString("MapTileDirectory", "maptiles")); m_ThisGatekeeper = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty); -- cgit v1.1