Simply check the file hash value and delete the old pac file

This commit is contained in:
2dust
2025-03-17 11:05:04 +08:00
parent e054d4487d
commit 7cc42ae249
2 changed files with 52 additions and 6 deletions
+7
View File
@@ -33,6 +33,13 @@ namespace ServiceLib.Handler
private static async Task InitText()
{
var path = Path.Combine(_configPath, "pac.txt");
// Delete the old pac file
if (File.Exists(path) && Utils.GetFileHash(path).Equals("b590c07280f058ef05d5394aa2f927fe"))
{
File.Delete(path);
}
if (!File.Exists(path))
{
var pac = EmbedUtils.GetEmbedText(Global.PacFileName);