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());