From d466afc6151be0e0265d896844abd7064001ca59 Mon Sep 17 00:00:00 2001 From: Jim Evans Date: Thu, 24 Oct 2013 07:48:19 -0400 Subject: [PATCH] Updating .NET path manipulation when launching Firefox process Fixes issue #6418. --- dotnet/src/webdriver/Firefox/Internal/Executable.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dotnet/src/webdriver/Firefox/Internal/Executable.cs b/dotnet/src/webdriver/Firefox/Internal/Executable.cs index 9e5f3bde077f1..df149ac8206c4 100644 --- a/dotnet/src/webdriver/Firefox/Internal/Executable.cs +++ b/dotnet/src/webdriver/Firefox/Internal/Executable.cs @@ -105,7 +105,7 @@ 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. @@ -113,11 +113,13 @@ public void SetLibraryPath(Process builder) 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.