In XBakes use proper disposal semantics to always close the stream on Store() no matter what

mb-throttle-test
Justin Clark-Casey (justincc) 2014-12-20 01:32:49 +00:00
parent e901253b49
commit 9edc5cac96
1 changed files with 2 additions and 4 deletions

View File

@ -107,11 +107,9 @@ namespace OpenSim.Server.Handlers.BakedTextures
File.Delete(diskFile);
byte[] data = utf8encoding.GetBytes(sdata);
FileStream fs = File.Create(diskFile);
fs.Write(data, 0, data.Length);
fs.Close();
using (FileStream fs = File.Create(diskFile))
fs.Write(data, 0, data.Length);
}
private void HandleDeleteBakes(string module, string[] args)