Changed manual stream closing to a using statement.

This commit is contained in:
Jarl Gullberg 2017-05-29 18:15:49 +02:00
parent 9f4eb8546e
commit f3f90691e6
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23

View file

@ -77,10 +77,12 @@ namespace OpenTK.Rewrite
if (!String.IsNullOrEmpty(keyfile) && File.Exists(keyfile))
{
keyfile = Path.GetFullPath(keyfile);
var fs = new FileStream(keyfile, FileMode.Open, FileAccess.Read);
var keypair = new System.Reflection.StrongNameKeyPair(fs);
fs.Close();
write_params.StrongNameKeyPair = keypair;
using (var fs = new FileStream(keyfile, FileMode.Open, FileAccess.Read))
{
var keypair = new System.Reflection.StrongNameKeyPair(fs);
write_params.StrongNameKeyPair = keypair;
}
}
else
{