mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 397469 - Fix problem with scanner discovery on relative source paths.
This commit is contained in:
parent
e4943b330a
commit
e679870821
1 changed files with 3 additions and 2 deletions
|
@ -221,7 +221,8 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
|
|||
// appending fileName to cwd should yield file path
|
||||
filePath = cwd.append(fileName);
|
||||
}
|
||||
if (!filePath.toOSString().equalsIgnoreCase(EFSExtensionManager.getDefault().getPathFromURI(file.getLocationURI()))) {
|
||||
IPath fileLocation = new Path(EFSExtensionManager.getDefault().getPathFromURI(file.getLocationURI()));
|
||||
if (!filePath.toString().equalsIgnoreCase(fileLocation.toString())) {
|
||||
// must be the cwd is wrong
|
||||
// check if file name starts with ".."
|
||||
if (fileName.startsWith("..")) { //$NON-NLS-1$
|
||||
|
@ -238,7 +239,7 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
|
|||
tPath = tPath.removeFirstSegments(1);
|
||||
}
|
||||
// get the file path from the file
|
||||
filePath = new Path(EFSExtensionManager.getDefault().getPathFromURI(file.getLocationURI()));
|
||||
filePath = fileLocation;
|
||||
IPath lastFileSegment = filePath.removeFirstSegments(filePath.segmentCount() - tPath.segmentCount());
|
||||
if (lastFileSegment.matchingFirstSegments(tPath) == tPath.segmentCount()) {
|
||||
cwd = filePath.removeLastSegments(tPath.segmentCount());
|
||||
|
|
Loading…
Add table
Reference in a new issue