mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-05 16:15:25 +02:00
Bug 397469 - Fix problem with scanner discovery on relative source
paths. Change-Id: Ic8630565de6d0481c3ebc1a92f3841460e8f17d1 Reviewed-on: https://git.eclipse.org/r/9462 Reviewed-by: Doug Schaefer <dschaefer@qnx.com> IP-Clean: Doug Schaefer <dschaefer@qnx.com> Tested-by: Doug Schaefer <dschaefer@qnx.com>
This commit is contained in:
parent
1285875212
commit
f0f4c6e022
2 changed files with 3 additions and 2 deletions
|
@ -221,7 +221,7 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
|
|||
// appending fileName to cwd should yield file path
|
||||
filePath = cwd.append(fileName);
|
||||
}
|
||||
if (!filePath.toString().equalsIgnoreCase(EFSExtensionManager.getDefault().getPathFromURI(file.getLocationURI()))) {
|
||||
if (!filePath.toOSString().equalsIgnoreCase(EFSExtensionManager.getDefault().getPathFromURI(file.getLocationURI()))) {
|
||||
// must be the cwd is wrong
|
||||
// check if file name starts with ".."
|
||||
if (fileName.startsWith("..")) { //$NON-NLS-1$
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
|
@ -54,7 +55,7 @@ public abstract class EFSExtensionProvider {
|
|||
* physical file.
|
||||
*/
|
||||
public String getPathFromURI(URI locationURI) {
|
||||
return locationURI.getPath();
|
||||
return new File(locationURI).getAbsolutePath();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue