Skip to content

Commit

Permalink
Merge pull request #147 from kusomaigo/master
Browse files Browse the repository at this point in the history
use system environment variable for Appdata and Appdata/LocalLow
  • Loading branch information
benaclejames authored Jun 13, 2023
2 parents 292a4a5 + 0c4e5cf commit ecad790
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VRCFaceTracking.Core/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static class Utils

public static readonly bool HasAdmin = new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);

public static readonly string PersistentDataDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "VRCFaceTracking");
public static readonly string PersistentDataDirectory = Path.Combine(Environment.GetEnvironmentVariable("appdata"), "VRCFaceTracking");
public static readonly string CustomLibsDirectory = PersistentDataDirectory + "\\CustomLibs";
}
}
3 changes: 1 addition & 2 deletions VRCFaceTracking.Core/VRChat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ namespace VRCFaceTracking.Core
{
public static class VRChat
{
public static readonly string VRCData = Path.Combine(Environment
.GetFolderPath(Environment.SpecialFolder.ApplicationData).Replace("Roaming", "LocalLow"), "VRChat\\VRChat");
public static readonly string VRCData = Path.Combine($"{Environment.GetEnvironmentVariable("localappdata")}Low", "VRChat\\VRChat");

public static readonly string VRCOSCDirectory = Path.Combine(VRCData, "OSC");

Expand Down

0 comments on commit ecad790

Please sign in to comment.