Forráskód Böngészése

Bug 1741: Failure in .NET assembly when ProgramFiles(x86) environment variable is not set and WinSCP executable cannot be found anywhere

https://winscp.net/tracker/1741
(cherry picked from commit 8e45684db4609b1ab9982b0fab16fcdc0866af97)

Source commit: 177a79c9c6bd33d63e550ae4c05c71cebf38076d
Martin Prikryl 6 éve
szülő
commit
97fedbbddf
1 módosított fájl, 1 hozzáadás és 2 törlés
  1. 1 2
      dotnet/internal/ExeSessionProcess.cs

+ 1 - 2
dotnet/internal/ExeSessionProcess.cs

@@ -864,8 +864,7 @@ namespace WinSCP
             string programFiles;
             if (IntPtr.Size == 8)
             {
-                // In .NET 4 we can use Environment.SpecialFolder.ProgramFilesX86
-                programFiles = Environment.GetEnvironmentVariable("ProgramFiles(x86)");
+                programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
             }
             else
             {