From a32e27323c8d15301f87cc02901ad97c7f01fe6a Mon Sep 17 00:00:00 2001 From: HolographicHat Date: Sun, 22 Jun 2025 23:15:34 +0800 Subject: [PATCH] fix sentry#2715 --- YaeAchievement/src/AppConfig.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/YaeAchievement/src/AppConfig.cs b/YaeAchievement/src/AppConfig.cs index 94e1382..c3d254b 100644 --- a/YaeAchievement/src/AppConfig.cs +++ b/YaeAchievement/src/AppConfig.cs @@ -88,7 +88,8 @@ public static partial class AppConfig { return null; } var entryName = matchResult.Groups["1"].Value.Replace("_Data", ".exe"); - return Path.GetFullPath(Path.Combine(matchResult.Value, "..", entryName)); + var fullPath = Path.GetFullPath(Path.Combine(matchResult.Value, "..", entryName)); + return File.Exists(fullPath) ? fullPath : null; } [GeneratedRegex(@"(?m).:(?:\\|/).+(GenshinImpact_Data|YuanShen_Data)", RegexOptions.IgnoreCase)]