Improved app start up
Fixed issues with extraction
This commit is contained in:
parent
8a4e601236
commit
478d5196a6
10 changed files with 84 additions and 91 deletions
|
@ -103,16 +103,13 @@ namespace auto_creamapi.Services
|
|||
|
||||
private static string GetHash(string filename)
|
||||
{
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
using var md5 = MD5.Create();
|
||||
using var stream = File.OpenRead(filename);
|
||||
return BitConverter
|
||||
.ToString(md5.ComputeHash(stream))
|
||||
.Replace("-", string.Empty);
|
||||
}
|
||||
if (!File.Exists(filename)) return "";
|
||||
using var md5 = MD5.Create();
|
||||
using var stream = File.OpenRead(filename);
|
||||
return BitConverter
|
||||
.ToString(md5.ComputeHash(stream))
|
||||
.Replace("-", string.Empty);
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue