aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2012-03-13 16:03:19 +1100
committerRob Pike <r@golang.org>2012-03-13 16:03:19 +1100
commitd0a4c9bb626df78230613162b0dc07c72855b3c1 (patch)
tree94dbddcf959acb79f24cde97c7e8f999cb6b8eab
parentc405b58f3fa7988d42b5e5e46910344f342c5b45 (diff)
downloadgo-d0a4c9bb626df78230613162b0dc07c72855b3c1.tar.gz
go-d0a4c9bb626df78230613162b0dc07c72855b3c1.zip
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
-rw-r--r--src/cmd/gc/subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c
index 22c371e534..4fc658f7bc 100644
--- a/src/cmd/gc/subr.c
+++ b/src/cmd/gc/subr.c
@@ -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;
}