mirror of
https://github.com/HolographicHat/Yae.git
synced 2025-12-15 10:58:13 +08:00
Fix path error
This commit is contained in:
@@ -21,11 +21,12 @@ public static class AppConfig {
|
|||||||
latestLogPath = osLogPath;
|
latestLogPath = osLogPath;
|
||||||
} else {
|
} else {
|
||||||
var cnLastWriteTime = File.GetLastWriteTime(cnLogPath);
|
var cnLastWriteTime = File.GetLastWriteTime(cnLogPath);
|
||||||
var osLastWriteTime = File.GetLastWriteTime(cnLogPath);
|
var osLastWriteTime = File.GetLastWriteTime(osLogPath);
|
||||||
latestLogPath = cnLastWriteTime > osLastWriteTime ? cnLogPath : osLogPath;
|
latestLogPath = cnLastWriteTime > osLastWriteTime ? cnLogPath : osLogPath;
|
||||||
}
|
}
|
||||||
var content = File.ReadAllText(latestLogPath);
|
var content = File.ReadAllText(latestLogPath);
|
||||||
var matchResult = Regex.Match(content, @"(?m).:/.+(GenshinImpact_Data|YuanShen_Data)");
|
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