mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
Bug 525438 - Fix file path comparison in AbstractIndexAstChecker.getLineCommentsForLocation()
Using IPath.toPortableString() was causing a forward slash vs. backward slash mismtach in the path comparison on Windows. Change-Id: Ib3eb392065fb473f6b6e70cb1dcddceb34ae7240
This commit is contained in:
parent
f5c0094767
commit
9792a72dae
1 changed files with 1 additions and 2 deletions
|
@ -171,8 +171,7 @@ public abstract class AbstractIndexAstChecker extends AbstractCheckerWithProblem
|
|||
for (IASTComment comm : commentsArray) {
|
||||
IASTFileLocation fileLocation = comm.getFileLocation();
|
||||
if (fileLocation.getStartingLineNumber() == loc.getLineNumber()) {
|
||||
//XXX check on windows portable or os?
|
||||
String problemFile = loc.getFile().getLocation().toPortableString();
|
||||
String problemFile = loc.getFile().getLocation().toOSString();
|
||||
String commentFile = fileLocation.getFileName();
|
||||
if (problemFile.equals(commentFile)) {
|
||||
lineComments.add(comm);
|
||||
|
|
Loading…
Add table
Reference in a new issue