From dcfd54b7608093d509cd045a152a4cde7317f66f Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 8 Sep 2020 21:17:45 +1000 Subject: Move various paths out of the bin directory. --- OpenSim/Framework/Console/LocalConsole.cs | 4 ++-- OpenSim/Framework/Util.cs | 25 +++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index e1492b8..f84d21c 100755 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs @@ -96,9 +96,9 @@ namespace OpenSim.Framework.Console return; } - string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", "OpenSimConsoleHistory.txt"); + string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", Path.Combine(Util.logsDir(), "OpenSimConsoleHistory.txt")); int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100); - m_historyPath = Path.GetFullPath(Path.Combine(Util.configDir(), m_historyFile)); + m_historyPath = Path.GetFullPath(m_historyFile); m_historytimestamps = startupConfig.GetBoolean("ConsoleHistoryTimeStamp", false); m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1} {2} timestamps", m_historySize, m_historyPath, m_historytimestamps?"with":"without"); diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index e0e35db..cc449af 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -1304,8 +1304,19 @@ namespace OpenSim.Framework return Path.Combine(configDir(), "inventory"); } + public static string dbDir() + { + return Path.Combine("..", Path.Combine("..", "db")); + } + + public static string cacheDir() + { + return Path.Combine("..", Path.Combine("..", "caches")); + } + public static string configDir() { +// return Path.Combine("..", Path.Combine("..", "config")); return "."; } @@ -1314,6 +1325,16 @@ namespace OpenSim.Framework return "."; } + public static string logsDir() + { + return Path.Combine("..", "logs"); + } + + public static string webDir() + { + return Path.Combine("..", Path.Combine("..", "web")); + } + public static string logFile() { foreach (IAppender appender in LogManager.GetRepository().GetAppenders()) @@ -1324,7 +1345,7 @@ namespace OpenSim.Framework } } - return "./OpenSim.log"; + return Path.Combine(logsDir(), "OpenSim.log"); } public static string statsLogFile() @@ -1337,7 +1358,7 @@ namespace OpenSim.Framework } } - return "./OpenSimStats.log"; + return Path.Combine(logsDir(), "OpenSimStats.log"); } public static string logDir() -- cgit v1.1