Skip to content

Commit

Permalink
Get OSArchitecture from Platform Abstraction to check for ARM Process…
Browse files Browse the repository at this point in the history
…or (#1242)

* GetOsArchitecture from Platform Abstraction to check for ARM

* making sure path is always small
  • Loading branch information
mayankbansal018 authored Oct 30, 2017
1 parent f7f4d5d commit d184af6
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,13 @@ public PlatformArchitecture GetCurrentProcessArchitecture()
/// <inheritdoc/>
public string GetNativeDllDirectory()
{
var isArm = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE").Contains("ARM");
return Path.Combine(this.GetCurrentProcessLocation(), this.GetCurrentProcessArchitecture().ToString(), isArm ? ARM : string.Empty);
var osArchitecture = new PlatformEnvironment().Architecture;
if (osArchitecture == PlatformArchitecture.ARM || osArchitecture == PlatformArchitecture.ARM64)
{
return Path.Combine(this.GetCurrentProcessLocation(), this.GetCurrentProcessArchitecture().ToString().ToLower(), ARM);
}

return Path.Combine(this.GetCurrentProcessLocation(), this.GetCurrentProcessArchitecture().ToString().ToLower());
}
}
}

0 comments on commit d184af6

Please sign in to comment.