Add a using() block around the timer script

remotes/origin/0.6.7-post-fixes
Melanie 2009-09-11 21:52:49 +01:00
parent 5de1ec735c
commit 496b368334
1 changed files with 8 additions and 6 deletions

View File

@ -423,7 +423,8 @@ namespace OpenSim
{ {
m_log.Info("[COMMANDFILE]: Running " + fileName); m_log.Info("[COMMANDFILE]: Running " + fileName);
StreamReader readFile = File.OpenText(fileName); using (StreamReader readFile = File.OpenText(fileName))
{
string currentCommand; string currentCommand;
while ((currentCommand = readFile.ReadLine()) != null) while ((currentCommand = readFile.ReadLine()) != null)
{ {
@ -435,6 +436,7 @@ namespace OpenSim
} }
} }
} }
}
/// <summary> /// <summary>
/// Opens a file and uses it as input to the console command parser. /// Opens a file and uses it as input to the console command parser.