[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[imp-commit] r22885 - trunk/org.eclipse.imp.runtime/src/org/eclipse/imp/editor

Author: rfuhrer
Date: 2011-03-07 11:13:49 -0500 (Mon, 07 Mar 2011)
New Revision: 22885

Modified:
   trunk/org.eclipse.imp.runtime/src/org/eclipse/imp/editor/EditorInputUtils.java
Log:
Fixed backward test in getFile(): it would return an IFile for a Path that really doesn't reside in the workspace.

Modified: trunk/org.eclipse.imp.runtime/src/org/eclipse/imp/editor/EditorInputUtils.java
===================================================================
--- trunk/org.eclipse.imp.runtime/src/org/eclipse/imp/editor/EditorInputUtils.java	2011-03-07 14:30:24 UTC (rev 22884)
+++ trunk/org.eclipse.imp.runtime/src/org/eclipse/imp/editor/EditorInputUtils.java	2011-03-07 16:13:49 UTC (rev 22885)
@@ -83,7 +83,7 @@
             URI uri= uriEditorInput.getURI();
             String path= uri.getPath();
             // Bug 526: uri.getHost() can be null for a local file URL
-            if (uri.getScheme().equals("file") && (uri.getHost() == null || uri.getHost().equals("localhost")) && !path.startsWith(wsRoot.getLocation().toOSString())) {
+            if (uri.getScheme().equals("file") && (uri.getHost() == null || uri.getHost().equals("localhost")) && path.startsWith(wsRoot.getLocation().toOSString())) {
                 file= wsRoot.getFile(new Path(path));
             }
         }