aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index e6ddb5b..10071a0 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -423,14 +423,16 @@ namespace OpenSim
423 { 423 {
424 m_log.Info("[COMMANDFILE]: Running " + fileName); 424 m_log.Info("[COMMANDFILE]: Running " + fileName);
425 425
426 StreamReader readFile = File.OpenText(fileName); 426 using (StreamReader readFile = File.OpenText(fileName))
427 string currentCommand;
428 while ((currentCommand = readFile.ReadLine()) != null)
429 { 427 {
430 if (currentCommand != String.Empty) 428 string currentCommand;
429 while ((currentCommand = readFile.ReadLine()) != null)
431 { 430 {
432 m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'"); 431 if (currentCommand != String.Empty)
433 m_console.RunCommand(currentCommand); 432 {
433 m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
434 m_console.RunCommand(currentCommand);
435 }
434 } 436 }
435 } 437 }
436 } 438 }