Skip to content

Commit

Permalink
Updating .NET path manipulation when launching Firefox process
Browse files Browse the repository at this point in the history
Fixes issue SeleniumHQ#6418.
  • Loading branch information
jimevans committed Oct 24, 2013
1 parent 0ae18aa commit d466afc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dotnet/src/webdriver/Firefox/Internal/Executable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,21 @@ public void SetLibraryPath(Process builder)
// Check our extra env vars for the same var, and use it too.
if (builder.StartInfo.EnvironmentVariables.ContainsKey(propertyName))
{
libraryPath.Append(env).Append(Path.PathSeparator);
libraryPath.Append(builder.StartInfo.EnvironmentVariables[propertyName]).Append(Path.PathSeparator);
}

// Last, add the contents of the specified system property, defaulting to the binary's path.
// On Snow Leopard, beware of problems the sqlite library
string firefoxLibraryPath = Path.GetFullPath(this.binaryLocation);
if (Platform.CurrentPlatform.IsPlatformType(PlatformType.Mac) && Platform.CurrentPlatform.MinorVersion > 5)
{
libraryPath.Append(libraryPath).Append(Path.PathSeparator);
libraryPath.Append(Path.PathSeparator);
}
else
{
libraryPath.Append(firefoxLibraryPath).Append(Path.PathSeparator).Append(libraryPath);
// Insert the Firefox library path and the path separator at the beginning
// of the path.
libraryPath.Insert(0, Path.PathSeparator).Insert(0, firefoxLibraryPath);
}

// Add the library path to the builder.
Expand Down

0 comments on commit d466afc

Please sign in to comment.