diff options
author | Andrew Gvozdev | 2010-03-08 05:35:44 +0000 |
---|---|---|
committer | Andrew Gvozdev | 2010-03-08 05:35:44 +0000 |
commit | 84a7310e5a78f8c9bf2e93e417a10e80eb52a222 (patch) | |
tree | d32eca98f50c1336eaed4c437d0baa4cec5f3956 /build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder | |
parent | 48a94a750cebd2f924179257f0189f1e799e517a (diff) | |
download | org.eclipse.cdt-84a7310e5a78f8c9bf2e93e417a10e80eb52a222.tar.gz org.eclipse.cdt-84a7310e5a78f8c9bf2e93e417a10e80eb52a222.tar.xz org.eclipse.cdt-84a7310e5a78f8c9bf2e93e417a10e80eb52a222.zip |
bug 213920: cygwin path resolver does not work for "locked" registry in windows
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder')
-rw-r--r-- | build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java index db6ce860339..c866414fcf1 100644 --- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java @@ -40,10 +40,10 @@ public class CygwinPathResolver implements IBuildPathResolver { private static final String PROPERTY_OS_NAME = "os.name"; //$NON-NLS-1$ private static final String PROPERTY_OS_VALUE = "windows";//$NON-NLS-1$ private static final String SP = " "; //$NON-NLS-1$ - // note that in Cygwin 1.7 the mount point storage has been moved out of the registry - private static final String REGISTRY_KEY_MOUNTS = "SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\"; //$NON-NLS-1$ private static final String REGISTRY_KEY_SETUP = "SOFTWARE\\Cygwin\\setup"; //$NON-NLS-1$ private static final String REGISTRY_KEY_SETUP_WIN64 = "SOFTWARE\\Wow6432Node\\Cygwin\\setup"; //$NON-NLS-1$ + // note that in Cygwin 1.7 the mount point storage has been moved out of the registry + private static final String REGISTRY_KEY_MOUNTS = "SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\"; //$NON-NLS-1$ private static final String PATH_NAME = "native"; //$NON-NLS-1$ private static final String SSLASH = "/"; //$NON-NLS-1$ private static final String BSLASH = "\\\\"; //$NON-NLS-1$ @@ -181,21 +181,21 @@ public class CygwinPathResolver implements IBuildPathResolver { } } - // 2. Try to find the root dir in SOFTWARE\Cygnus Solutions - if (rootValue == null) { - rootValue = readValueFromRegistry(REGISTRY_KEY_MOUNTS + ROOTPATTERN, PATH_NAME); - } - - // 3. Try to find the root dir in SOFTWARE\Cygwin\setup + // 2. Try to find the root dir in SOFTWARE\Cygwin\setup if(rootValue == null) { rootValue = readValueFromRegistry(REGISTRY_KEY_SETUP, "rootdir"); //$NON-NLS-1$ } - // 4. Try to find the root dir in SOFTWARE\Wow6432Node\Cygwin\setup + // 3. Try to find the root dir in SOFTWARE\Wow6432Node\Cygwin\setup if(rootValue == null) { rootValue = readValueFromRegistry(REGISTRY_KEY_SETUP_WIN64, "rootdir"); //$NON-NLS-1$ } + // 4. Try to find the root dir in SOFTWARE\Cygnus Solutions + if (rootValue == null) { + rootValue = readValueFromRegistry(REGISTRY_KEY_MOUNTS + ROOTPATTERN, PATH_NAME); + } + // 5. Try the default Cygwin install dir if(rootValue == null) { File file = new File(DEFAULT_ROOT); |