1
0
mirror of https://github.com/golang/go synced 2024-11-21 23:54:40 -07:00

cmd/gc: import path cannot start with slash on Windows

For CL 5756065.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5784065
This commit is contained in:
Shenghou Ma 2012-03-10 05:11:51 +08:00
parent 6d4da06d36
commit 29199aa4e4

View File

@ -514,7 +514,7 @@ addidir(char* dir)
static int
islocalname(Strlit *name)
{
if(!windows && name->len >= 1 && name->s[0] == '/')
if(name->len >= 1 && name->s[0] == '/')
return 1;
if(windows && name->len >= 3 &&
yy_isalpha(name->s[0]) && name->s[1] == ':' && name->s[2] == '/')