1
0
mirror of https://github.com/golang/go synced 2024-11-12 06:40:22 -07:00

gc: allow ~ in import paths

Windows has paths like C:/Users/ADMIN~1. Also, it so happens
that go/parser allows ~ in import paths. So does the spec.
Fixes the build too.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5777073
This commit is contained in:
Rob Pike 2012-03-13 16:03:19 +11:00
parent c405b58f3f
commit d0a4c9bb62

View File

@ -3639,7 +3639,7 @@ isbadimport(Strlit *path)
yyerror("import path contains space character: \"%s\"", path->s);
return 1;
}
if(utfrune("!\"#$%&'()*,:;<=>?[]^`{|}~", r)) {
if(utfrune("!\"#$%&'()*,:;<=>?[]^`{|}", r)) {
yyerror("import path contains invalid character '%C': \"%s\"", r, path->s);
return 1;
}