diff options
author | Andrew Gvozdev | 2013-01-06 12:37:51 +0000 |
---|---|---|
committer | Andrew Gvozdev | 2013-01-06 12:52:24 +0000 |
commit | 104a1ae1ccb0daebc899d744006879f187d1ba33 (patch) | |
tree | 70246c675e366e14ae31b26d21337211f690b1e3 | |
parent | 407b68894d2c0e5b80a2ca43a8ee45e76325bff7 (diff) | |
download | org.eclipse.cdt-104a1ae1ccb0daebc899d744006879f187d1ba33.tar.gz org.eclipse.cdt-104a1ae1ccb0daebc899d744006879f187d1ba33.tar.xz org.eclipse.cdt-104a1ae1ccb0daebc899d744006879f187d1ba33.zip |
Bug 397469 - Fix problem with scanner discovery on relative source paths.
-rw-r--r-- | build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java index af58dd60d6a..29694f9b1e7 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java @@ -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()); |