Skip to content

Commit

Permalink
Search for mpf in user path
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurkehrwald authored and freezy committed Sep 8, 2024
1 parent 119d25a commit ceced8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion VisualPinball.Engine.Mpf/MpfSpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ private static string GetFullPath(string fileName)
}

// go through all PATHs
var values = Environment.GetEnvironmentVariable("PATH");
var values = Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Machine);
values += Path.PathSeparator + Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.User);
foreach (var path in values.Split(Path.PathSeparator)) {
var fullPath = Path.Combine(path, fileName);
if (File.Exists(fullPath)) {
Expand Down

0 comments on commit ceced8e

Please sign in to comment.