[symbolize] Check whether the path is absolute
This avoids duplicating the path if it's already absolute.
Change-Id: Ic3dbd2757247bc6ed60fbaf5d1b52e3ef82e82f6
diff --git a/symbolize/repo.go b/symbolize/repo.go
index 27c0aba..12b6795 100644
--- a/symbolize/repo.go
+++ b/symbolize/repo.go
@@ -54,7 +54,9 @@
if i.rel {
base := filepath.Dir(i.pathToIDs)
for idx, ref := range out {
- out[idx].Filepath = filepath.Join(base, ref.Filepath)
+ if !filepath.IsAbs(ref.Filepath) {
+ out[idx].Filepath = filepath.Join(base, ref.Filepath)
+ }
}
}
return out, nil