aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 132e86d..b116afa 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -156,6 +156,8 @@ namespace OpenSim
156 /// <param name="configSource"></param> 156 /// <param name="configSource"></param>
157 public OpenSimBase(IConfigSource configSource) : base() 157 public OpenSimBase(IConfigSource configSource) : base()
158 { 158 {
159 bool iniFileExists = false;
160
159 IConfig startupConfig = configSource.Configs["Startup"]; 161 IConfig startupConfig = configSource.Configs["Startup"];
160 162
161 string iniFileName = startupConfig.GetString("inifile", "OpenSim.ini"); 163 string iniFileName = startupConfig.GetString("inifile", "OpenSim.ini");
@@ -168,6 +170,8 @@ namespace OpenSim
168 //check for .INI file (either default or name passed in command line) 170 //check for .INI file (either default or name passed in command line)
169 if (File.Exists(Application.iniFilePath)) 171 if (File.Exists(Application.iniFilePath))
170 { 172 {
173 iniFileExists = true;
174
171 // From reading Nini's code, it seems that later merged keys replace earlier ones. 175 // From reading Nini's code, it seems that later merged keys replace earlier ones.
172 m_config.Source.Merge(new IniConfigSource(Application.iniFilePath)); 176 m_config.Source.Merge(new IniConfigSource(Application.iniFilePath));
173 m_config.Source.Merge(configSource); 177 m_config.Source.Merge(configSource);
@@ -179,11 +183,16 @@ namespace OpenSim
179 183
180 if (File.Exists(Application.iniFilePath)) 184 if (File.Exists(Application.iniFilePath))
181 { 185 {
186 iniFileExists = true;
187
182 m_config.Source = new XmlConfigSource(); 188 m_config.Source = new XmlConfigSource();
183 m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath)); 189 m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath));
184 m_config.Source.Merge(configSource); 190 m_config.Source.Merge(configSource);
185 } 191 }
186 } 192 }
193
194 if (!iniFileExists)
195 m_config.Save("OpenSim.ini");
187 196
188 ReadConfigSettings(); 197 ReadConfigSettings();
189 } 198 }