mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
bug 213920: cygwin path resolver does not work for "locked" registry in windows
This commit is contained in:
parent
48a94a750c
commit
84a7310e5a
1 changed files with 9 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue