]> Cypherpunks repositories - gostls13.git/commitdiff
gc: allow ~ in import paths
authorRob Pike <r@golang.org>
Tue, 13 Mar 2012 05:03:19 +0000 (16:03 +1100)
committerRob Pike <r@golang.org>
Tue, 13 Mar 2012 05:03:19 +0000 (16:03 +1100)
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

index 22c371e53421172f7f12bbc630b08fa80ce4bba3..4fc658f7bc3ac51f06cc5ebaba964710ad5dc8ef 100644 (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;
                }