mirror of
https://github.com/HolographicHat/Yae.git
synced 2025-12-14 18:38:13 +08:00
Fix path error
This commit is contained in:
@@ -21,11 +21,12 @@ public static class AppConfig {
|
||||
latestLogPath = osLogPath;
|
||||
} else {
|
||||
var cnLastWriteTime = File.GetLastWriteTime(cnLogPath);
|
||||
var osLastWriteTime = File.GetLastWriteTime(cnLogPath);
|
||||
var osLastWriteTime = File.GetLastWriteTime(osLogPath);
|
||||
latestLogPath = cnLastWriteTime > osLastWriteTime ? cnLogPath : osLogPath;
|
||||
}
|
||||
var content = File.ReadAllText(latestLogPath);
|
||||
var matchResult = Regex.Match(content, @"(?m).:/.+(GenshinImpact_Data|YuanShen_Data)");
|
||||
GamePath = matchResult.Value;
|
||||
var entryName = $"{matchResult.Groups["1"].Value.Replace("_Data", null)}.exe";
|
||||
GamePath = Path.GetFullPath(entryName, $"{matchResult.Value}/../");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user