aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authormingchen2007-10-28 03:41:34 +0000
committermingchen2007-10-28 03:41:34 +0000
commitd56da1c8311fdb27728580239399f429826d09a8 (patch)
tree5c16f81c58ee393475ad840691d8ce5a5c7fbb47 /OpenSim/Region/Application
parent* Added 'Jim' and 'Goblin' shapes; not available in inventory yet though (diff)
downloadopensim-SC_OLD-d56da1c8311fdb27728580239399f429826d09a8.zip
opensim-SC_OLD-d56da1c8311fdb27728580239399f429826d09a8.tar.gz
opensim-SC_OLD-d56da1c8311fdb27728580239399f429826d09a8.tar.bz2
opensim-SC_OLD-d56da1c8311fdb27728580239399f429826d09a8.tar.xz
*Replaced -useexecutepath with an updated -inifile extension. You can now specify either a filename (will use the default config path, or you can specify a full path.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 75c7eb5..bb26cae 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -95,20 +95,10 @@ namespace OpenSim
95 { 95 {
96 IConfig startupConfig = configSource.Configs["Startup"]; 96 IConfig startupConfig = configSource.Configs["Startup"];
97 97
98 string iniFile = startupConfig.GetString("inifile", "OpenSim.ini"); 98 string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");
99 string useExecutePathString = startupConfig.GetString("useexecutepath", "false").ToLower();
100
101 bool useExecutePath = false;
102 if (useExecutePathString == "true" || useExecutePathString == "" || useExecutePathString == "1" || useExecutePathString == "yes")
103 {
104 useExecutePath = true;
105 }
106
107 Util.changeUseExecutePathSetting(useExecutePath);
108 99
109 m_config = new IniConfigSource(); 100 m_config = new IniConfigSource();
110 //check for .INI file (either default or name passed in command line) 101 //check for .INI file (either default or name passed in command line)
111 string iniFilePath = Path.Combine(Util.configDir(), iniFile);
112 if (File.Exists(iniFilePath)) 102 if (File.Exists(iniFilePath))
113 { 103 {
114 m_config.Merge(new IniConfigSource(iniFilePath)); 104 m_config.Merge(new IniConfigSource(iniFilePath));
@@ -116,12 +106,22 @@ namespace OpenSim
116 } 106 }
117 else 107 else
118 { 108 {
119 // no default config files, so set default values, and save it 109 iniFilePath = Path.Combine(Util.configDir(), iniFilePath);
120 SetDefaultConfig(); 110 if (File.Exists(iniFilePath))
111 {
112 m_config.Merge(new IniConfigSource(iniFilePath));
113 m_config.Merge(configSource);
114 }
115 else
116 {
121 117
122 m_config.Merge(configSource); 118 // no default config files, so set default values, and save it
119 SetDefaultConfig();
123 120
124 m_config.Save(iniFilePath); 121 m_config.Merge(configSource);
122
123 m_config.Save(iniFilePath);
124 }
125 } 125 }
126 126
127 ReadConfigSettings(); 127 ReadConfigSettings();