Changed manual stream closing to a using statement.
This commit is contained in:
parent
9f4eb8546e
commit
f3f90691e6
1 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue