浏览代码

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 年前
父节点
当前提交
6addbe4978
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      internal/symbolizer/symbolizer.go

+ 1
- 1
internal/symbolizer/symbolizer.go 查看文件

314
 
314
 
315
 		// Skip mappings pointing to a source URL
315
 		// Skip mappings pointing to a source URL
316
 		if m.BuildID == "" {
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
 				continue
318
 				continue
319
 			}
319
 			}
320
 		}
320
 		}