Browse Source

pprof/internal/symbolizer: do not recognize C:\foo\bar.exe as a URL

Fixes executables named on the command line on Windows.
Fixes the build failure on https://go-review.googlesource.com/#/c/36798 patch set 6.
Russ Cox 8 years ago
parent
commit
6addbe4978
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      internal/symbolizer/symbolizer.go

+ 1
- 1
internal/symbolizer/symbolizer.go View File

@@ -314,7 +314,7 @@ func newMapping(prof *profile.Profile, obj plugin.ObjTool, ui plugin.UI, force b
314 314
 
315 315
 		// Skip mappings pointing to a source URL
316 316
 		if m.BuildID == "" {
317
-			if u, err := url.Parse(m.File); err == nil && u.IsAbs() {
317
+			if u, err := url.Parse(m.File); err == nil && u.IsAbs() && strings.Contains(strings.ToLower(u.Scheme), "http") {
318 318
 				continue
319 319
 			}
320 320
 		}