]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: mksyscall_windows.go: put path separator in suffix for matching GOROOT
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Mon, 25 Jul 2016 19:13:15 +0000 (04:13 +0900)
committerAlex Brainman <alex.brainman@gmail.com>
Wed, 17 Aug 2016 05:57:30 +0000 (05:57 +0000)
fixes #16493

Change-Id: I86bec2f9bd7965449c43e94733791f7cb18c5c4c
Reviewed-on: https://go-review.googlesource.com/25165
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
src/syscall/mksyscall_windows.go

index 1e0d9401e746f425158c2198073dc9ca46dcedbb..4f9c5d2ff9ed24840290651ea092fbbbde15079d 100644 (file)
@@ -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
 }