From 694642a482ffefb9c11ef05d833c508f383d2f0d Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Fri, 1 Feb 2008 23:56:09 +0000 Subject: Moved iniFilePath to a static and put it in OpenSim.Application.iniFilePath. Refreshing config based on this. Temporarily disabled feature to refresh config file while running. --- OpenSim/Region/Application/Application.cs | 2 ++ OpenSim/Region/Application/OpenSimMain.cs | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index bf44274..2045b56 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -35,6 +35,8 @@ namespace OpenSim { public class Application { + public static string iniFilePath = ""; + //could move our main function into OpenSimMain and kill this class [STAThread] public static void Main(string[] args) diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 70f9fd0..ad5a960 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -125,21 +125,21 @@ namespace OpenSim AddinManager.Initialize("."); AddinManager.Registry.Update(null); - string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); + Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); m_config = new IniConfigSource(); //check for .INI file (either default or name passed in command line) - if (File.Exists(iniFilePath)) + if (File.Exists(Application.iniFilePath)) { - m_config.Merge(new IniConfigSource(iniFilePath)); + m_config.Merge(new IniConfigSource(Application.iniFilePath)); m_config.Merge(configSource); } else { - iniFilePath = Path.Combine(Util.configDir(), iniFilePath); - if (File.Exists(iniFilePath)) + Application.iniFilePath = Path.Combine(Util.configDir(), Application.iniFilePath); + if (File.Exists(Application.iniFilePath)) { - m_config.Merge(new IniConfigSource(iniFilePath)); + m_config.Merge(new IniConfigSource(Application.iniFilePath)); m_config.Merge(configSource); } else @@ -149,7 +149,7 @@ namespace OpenSim m_config.Merge(configSource); - m_config.Save(iniFilePath); + m_config.Save(Application.iniFilePath); } } -- cgit v1.1