diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index eee078e..eb10fac 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -262,10 +262,17 @@ namespace OpenSim.Framework | |||
262 | return; | 262 | return; |
263 | } | 263 | } |
264 | 264 | ||
265 | IConfigSource source = new IniConfigSource(filename); | 265 | IniConfigSource source = new IniConfigSource(filename); |
266 | |||
267 | bool saveFile = false; | ||
268 | if (source.Configs[configName] == null) | ||
269 | saveFile = true; | ||
266 | 270 | ||
267 | ReadNiniConfig(source, configName); | 271 | ReadNiniConfig(source, configName); |
268 | 272 | ||
273 | if (configName != String.Empty && saveFile) | ||
274 | source.Save(filename); | ||
275 | |||
269 | return; | 276 | return; |
270 | } | 277 | } |
271 | 278 | ||
@@ -406,7 +413,8 @@ namespace OpenSim.Framework | |||
406 | 413 | ||
407 | if (source.Configs.Count == 0) | 414 | if (source.Configs.Count == 0) |
408 | { | 415 | { |
409 | name = MainConsole.Instance.CmdPrompt("New region name", String.Empty); | 416 | if (name == String.Empty) |
417 | name = MainConsole.Instance.CmdPrompt("New region name", name); | ||
410 | if (name == String.Empty) | 418 | if (name == String.Empty) |
411 | throw new Exception("Cannot interactively create region with no name"); | 419 | throw new Exception("Cannot interactively create region with no name"); |
412 | 420 | ||