diff --git a/src/AppConfig.cs b/src/AppConfig.cs index 4e39bd1..b6d095b 100644 --- a/src/AppConfig.cs +++ b/src/AppConfig.cs @@ -49,7 +49,9 @@ public static class AppConfig { var copiedLogFilePath = Path.GetTempFileName(); File.Copy(path, copiedLogFilePath, true); var content = File.ReadAllText(copiedLogFilePath); - File.Delete(copiedLogFilePath); + try { + File.Delete(copiedLogFilePath); + } catch (Exception) { /* ignore */} var matchResult = Regex.Match(content, @"(?m).:/.+(GenshinImpact_Data|YuanShen_Data)"); if (!matchResult.Success) { return null; diff --git a/src/Utils.cs b/src/Utils.cs index 840cf34..e0480dc 100644 --- a/src/Utils.cs +++ b/src/Utils.cs @@ -8,7 +8,6 @@ using System.Runtime.InteropServices; using Microsoft.Win32; using YaeAchievement.AppCenterSDK; using YaeAchievement.res; -using YaeAchievement.res; using YaeAchievement.Win32; namespace YaeAchievement;