mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
Fix Utils.SHA256CheckSum file handle not closed
This commit is contained in:
@@ -105,7 +105,7 @@ namespace Netch.Utils
|
||||
try
|
||||
{
|
||||
var sha256 = SHA256.Create();
|
||||
var fileStream = File.OpenRead(filePath);
|
||||
using var fileStream = File.OpenRead(filePath);
|
||||
return sha256.ComputeHash(fileStream).Aggregate(string.Empty, (current, b) => current + b.ToString("x2"));
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user