mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Close opened files.
This commit is contained in:
@@ -102,7 +102,9 @@ namespace DiscImageChef.Checksums
|
||||
public byte[] File(string filename)
|
||||
{
|
||||
FileStream fileStream = new FileStream(filename, FileMode.Open);
|
||||
return _sha384Provider.ComputeHash(fileStream);
|
||||
byte[] result = _sha384Provider.ComputeHash(fileStream);
|
||||
fileStream.Close();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -121,6 +123,8 @@ namespace DiscImageChef.Checksums
|
||||
sha384Output.Append(hash[i].ToString("x2"));
|
||||
}
|
||||
|
||||
fileStream.Close();
|
||||
|
||||
return sha384Output.ToString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user