From d0a4c9bb626df78230613162b0dc07c72855b3c1 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 13 Mar 2012 16:03:19 +1100 Subject: [PATCH] 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 --- src/cmd/gc/subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.50.0