mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 02:35:37 +02:00
Bug 511161: Early fail on non-absolute URIs when looking for files in workspace
Change-Id: Idefa850b3d43e13d878d5a19bd89bd42ee1c534f
This commit is contained in:
parent
93cfa42618
commit
45279d5ffc
1 changed files with 5 additions and 0 deletions
|
@ -651,6 +651,11 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
|
|||
* to reside in the given project.
|
||||
*/
|
||||
private static IResource findFileForLocationURI(URI uri, IProject preferredProject, boolean checkExistence) {
|
||||
if (!uri.isAbsolute()) {
|
||||
// IWorkspaceRoot.findFilesForLocationURI(URI) below requires an absolute URI
|
||||
// therefore we haven't/aren't going to find the file based on this URI.
|
||||
return null;
|
||||
}
|
||||
IResource sourceFile = null;
|
||||
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
|
||||
IResource[] resources = root.findFilesForLocationURI(uri);
|
||||
|
|
Loading…
Add table
Reference in a new issue