Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <mhutch@xamarin.com>2011-08-26 23:47:07 +0400
committerMichael Hutchinson <mhutch@xamarin.com>2011-08-26 23:47:07 +0400
commit8474fd0d9affdd0132b8288a2fe0eaaef9bfd9d2 (patch)
treee01b948ff516756939f20e7b2e4d19f61061964c /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs
parent5ccd3682298476b96b476425ec8b23d10342f7f6 (diff)
[Core] Work around Windows XP ProgramFilesx86 bug
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs
index 3af97d75cb..4b261e3b45 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs
@@ -116,9 +116,11 @@ namespace MonoDevelop.Ide.Gui.OptionPanels
//set a platform-dependent default folder for the dialog if possible
if (Platform.IsWindows) {
- string folder = Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86);
- if (!string.IsNullOrEmpty (folder) && System.IO.Directory.Exists (folder))
- dlg.CurrentFolder = folder;
+ // ProgramFilesX86 is broken on 32-bit WinXP
+ string programFilesX86 = Environment.GetFolderPath (
+ IntPtr.Size == 8? Environment.SpecialFolder.ProgramFilesX86 : Environment.SpecialFolder.ProgramFiles);
+ if (!string.IsNullOrEmpty (programFilesX86) && System.IO.Directory.Exists (programFilesX86))
+ dlg.CurrentFolder = programFilesX86;
} else {
if (System.IO.Directory.Exists ("/usr"))
dlg.CurrentFolder = "/usr";