Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java8
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/FileSystemUtilityManager.java8
2 files changed, 13 insertions, 3 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java
index ac4c6e0bbbc..bc0357cff7a 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -296,8 +296,12 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
Boolean includePathExists = true;
URI projectLocationURI = discPathInfo.getProject().getLocationURI();
+ // make relative path absolute (e.g. MinGW paths)
+ Path path = new Path(include);
+ String absoluteInclude = path.makeAbsolute().toOSString();
+
// use the project's location... create a URI that uses the same provider but that points to the include path
- URI includeURI = FileSystemUtilityManager.getDefault().replacePath(projectLocationURI, include);
+ URI includeURI = FileSystemUtilityManager.getDefault().replacePath(projectLocationURI, absoluteInclude);
// ask EFS if the path exists
try {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/FileSystemUtilityManager.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/FileSystemUtilityManager.java
index 6de31434c79..44d68c60c5c 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/FileSystemUtilityManager.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/FileSystemUtilityManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -135,6 +135,12 @@ public class FileSystemUtilityManager {
IFilesystemUtility utility = fSchemeToUtilityImplementerMap.get(uri.getScheme());
if(utility == null) {
+
+ //path needs to be prefixed with "/" otherwise it will throw URISyntaxException
+ if (!path.startsWith("/")) { //$NON-NLS-1$
+ path = "/" + path; //$NON-NLS-1$
+ }
+
// if there is no corresponding utility, then assume we can just replace the path field
try {
return new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(),

Back to the top