Commit 5dc7525b authored by Yasuhiro Matsumoto's avatar Yasuhiro Matsumoto Committed by Alex Brainman

syscall: mksyscall_windows.go: put path separator in suffix for matching GOROOT

fixes #16493

Change-Id: I86bec2f9bd7965449c43e94733791f7cb18c5c4c
Reviewed-on: https://go-review.googlesource.com/25165Reviewed-by: default avatarAlex Brainman <alex.brainman@gmail.com>
parent 00b779ae
......@@ -708,6 +708,10 @@ func (src *Source) IsStdRepo() (bool, error) {
abspath = strings.ToLower(abspath)
goroot = strings.ToLower(goroot)
}
sep := string(os.PathSeparator)
if !strings.HasSuffix(goroot, sep) {
goroot += sep
}
return strings.HasPrefix(abspath, goroot), nil
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment