Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2014-09-15 13:30:31 -0400
committerJeff Johnston2014-09-15 17:59:37 -0400
commit4174dcefab772fe12aa8666029d832e8822c1fd4 (patch)
treeacb702426009868d78fb3dfca3d66021dcb8398f
parent799dc82ee8d629efd6bbeaf8ee9e981dd2b78b4f (diff)
downloadorg.eclipse.linuxtools-4174dcefab772fe12aa8666029d832e8822c1fd4.tar.gz
org.eclipse.linuxtools-4174dcefab772fe12aa8666029d832e8822c1fd4.tar.xz
org.eclipse.linuxtools-4174dcefab772fe12aa8666029d832e8822c1fd4.zip
Bug 440277: Fix path name handling for source file lookup.
Change-Id: I75759ed5abb15e2ba4211b1acb1030d5838a70a4 Signed-off-by: Michael N. Lipp <imnl@mnl.de> Signed-off-by: Roland Grunberg <rgrunber@redhat.com> Reviewed-on: https://git.eclipse.org/r/33395 Tested-by: Hudson CI Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> Tested-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/view/annotatedsource/GcovAnnotationModel.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/view/annotatedsource/GcovAnnotationModel.java b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/view/annotatedsource/GcovAnnotationModel.java
index 3c69d3ee4e..ceb6892e2f 100644
--- a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/view/annotatedsource/GcovAnnotationModel.java
+++ b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/view/annotatedsource/GcovAnnotationModel.java
@@ -179,14 +179,14 @@ public final class GcovAnnotationModel implements IAnnotationModel {
for (SourceFile sf : sources) {
IPath sfPath = new Path(sf.getName());
IFile file = STLink2SourceSupport.getFileForPath(sfPath, cProject.getProject());
- if (file != null && element.getLocationURI().getPath().equals(file.getLocation().toOSString())) {
+ if (file != null && element.getResource().getLocation().equals(file.getLocation())) {
return sf;
}
}
IPath binFolder = target.removeLastSegments(1);
for (SourceFile sf : sources) {
- String sfPath = Paths.get(binFolder.toOSString(), sf.getName()).normalize().toString();
+ String sfPath = Paths.get(binFolder.toOSString()).resolve(sf.getName()).normalize().toString();
if (sfPath.equals(element.getLocationURI().getPath())) {
return sf;
}

Back to the top