Skip to content

Commit 5a1c7d5

Browse files
committed
Linux Proton Test
1 parent b3387ff commit 5a1c7d5

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

Utils/LogParser/LogWatcher.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{
33
using System;
44
using System.Collections.Generic;
5-
using System.Diagnostics;
65
using System.Globalization;
76
using System.IO;
87
using System.Reflection;
@@ -34,8 +33,24 @@ public OnLineArgs(string content, DateTime timestamp, T context)
3433
private DirectoryInfo m_LogDirectoryInfo;
3534
private readonly Dictionary<string, T> m_LogContextMap = new Dictionary<string, T>();
3635

37-
internal static string GetVRChatDataLocation() =>
38-
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"Low\VRChat";
36+
internal static string GetVRChatDataLocationWin() => Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"Low\VRChat";
37+
38+
internal static string GetVRChatDataLocation()
39+
{
40+
const string VRChatAppID = "438100";
41+
const string SteamCompDataPath = "STEAM_COMPAT_DATA_PATH";
42+
string? compatDataPath = Environment.GetEnvironmentVariable(SteamCompDataPath);
43+
44+
if (string.IsNullOrEmpty(compatDataPath))
45+
return GetVRChatDataLocationWin();
46+
47+
compatDataPath = Path.Combine(Path.GetDirectoryName(compatDataPath) ?? string.Empty, VRChatAppID, @"pfx\drive_c\users\steamuser\AppData\LocalLow\VRChat");
48+
49+
if (!Directory.Exists(compatDataPath))
50+
return GetVRChatDataLocationWin();
51+
52+
return compatDataPath;
53+
}
3954

4055
#region From Settings
4156
bool SkipParsedLogs => Settings.Get.SkipParsedLogs;

0 commit comments

Comments
 (0)