mirror of
https://github.com/HolographicHat/Yae.git
synced 2026-05-20 20:55:46 +08:00
fix #2471
This commit is contained in:
@@ -30,7 +30,11 @@ internal static class Program {
|
|||||||
#endif
|
#endif
|
||||||
options.TracesSampleRate = 1.0;
|
options.TracesSampleRate = 1.0;
|
||||||
options.AutoSessionTracking = true;
|
options.AutoSessionTracking = true;
|
||||||
options.SetBeforeSend(e => {
|
options.SetBeforeSend(static e => {
|
||||||
|
e.Release = GlobalVars.AppVersionName;
|
||||||
|
return e;
|
||||||
|
});
|
||||||
|
options.SetBeforeSendTransaction(static e => {
|
||||||
e.Release = GlobalVars.AppVersionName;
|
e.Release = GlobalVars.AppVersionName;
|
||||||
return e;
|
return e;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -160,7 +160,11 @@ public static class Utils {
|
|||||||
internal static void CheckGenshinIsRunning() {
|
internal static void CheckGenshinIsRunning() {
|
||||||
// QueryProcessEvent?
|
// QueryProcessEvent?
|
||||||
var appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
var appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||||
foreach (var path in Directory.EnumerateDirectories($"{appdata}/../LocalLow/miHoYo").Where(p => File.Exists($"{p}/info.txt"))) {
|
var dataPath = $"{appdata}/../LocalLow/miHoYo";
|
||||||
|
if (!Directory.Exists(dataPath)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
foreach (var path in Directory.EnumerateDirectories(dataPath).Where(p => File.Exists($"{p}/info.txt"))) {
|
||||||
try {
|
try {
|
||||||
using var handle = File.OpenHandle($"{path}/output_log.txt", share: FileShare.None, mode: FileMode.OpenOrCreate);
|
using var handle = File.OpenHandle($"{path}/output_log.txt", share: FileShare.None, mode: FileMode.OpenOrCreate);
|
||||||
} catch (IOException) {
|
} catch (IOException) {
|
||||||
|
|||||||
Reference in New Issue
Block a user