Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kazmierczyk2012-08-10 11:03:07 +0000
committerChris Recoskie2012-08-27 18:38:04 +0000
commit30c32372272b841cfc1b6625bbb42eabbf40ae7f (patch)
treefa401235b855c985defd206456f8f05de1f6d544
parente658da36e5f8c8476b50d7824287d165c8a30c6e (diff)
downloadorg.eclipse.cdt-30c32372272b841cfc1b6625bbb42eabbf40ae7f.tar.gz
org.eclipse.cdt-30c32372272b841cfc1b6625bbb42eabbf40ae7f.tar.xz
org.eclipse.cdt-30c32372272b841cfc1b6625bbb42eabbf40ae7f.zip
Fix Bug 378882 - CDT projects not working when managed by custom EFS
filesystem Change-Id: I6e0966b63c5be81cb35008edb3cd9218023aaf3e Reviewed-on: https://git.eclipse.org/r/7184 Reviewed-by: Chris Recoskie <recoskie@ca.ibm.com> IP-Clean: Chris Recoskie <recoskie@ca.ibm.com> Tested-by: Chris Recoskie <recoskie@ca.ibm.com>
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/UNCPathConverter.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/UNCPathConverter.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/UNCPathConverter.java
index 44e6bdd1c31..91de1214d5e 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/UNCPathConverter.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/UNCPathConverter.java
@@ -58,18 +58,23 @@ public abstract class UNCPathConverter {
/**
- * Convert a URI to an IPath. If URI has a host section, return a UNC rather than a file based path.
+ * Convert a URI to an IPath.
+ * Resolves to local path if possible, including using EFS where required.
*
* @param uri
* URI to convert to an IPath
* @return IPath representation of the URI
*/
public static IPath toPath(URI uri) {
+ IPath localPath = URIUtil.toPath(uri);
String host = uri.getHost();
- if (host != null) {
+ // try local path first
+ // that'll give EFS a chance to resolve a custom protocol path.
+ if (host != null && localPath == null) {
return new Path(host + uri.getPath()).makeUNC(true);
- }
- return URIUtil.toPath(uri);
+ } else {
+ return localPath;
+ }
}
/**

Back to the top