1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 355399 - NPE in

ScannerInfoConsoleParserUtility.translateRelativePaths() for remote
projects
This commit is contained in:
Chris Recoskie 2011-08-22 13:19:10 -04:00
parent beed0532bc
commit 3d08050db8

View file

@ -23,6 +23,7 @@ import org.eclipse.cdt.internal.core.resources.ResourceLookup;
import org.eclipse.cdt.make.core.MakeCorePlugin; import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.internal.core.MakeMessages; import org.eclipse.cdt.make.internal.core.MakeMessages;
import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil; import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil;
import org.eclipse.cdt.utils.EFSExtensionManager;
import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
@ -220,7 +221,7 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
// appending fileName to cwd should yield file path // appending fileName to cwd should yield file path
filePath = cwd.append(fileName); filePath = cwd.append(fileName);
} }
if (!filePath.toString().equalsIgnoreCase(file.getLocation().toString())) { if (!filePath.toString().equalsIgnoreCase(EFSExtensionManager.getDefault().getPathFromURI(file.getLocationURI()))) {
// must be the cwd is wrong // must be the cwd is wrong
// check if file name starts with ".." // check if file name starts with ".."
if (fileName.startsWith("..")) { //$NON-NLS-1$ if (fileName.startsWith("..")) { //$NON-NLS-1$