]> Cypherpunks repositories - gostls13.git/commitdiff
path/filepath: remove code working around Join bug
authorAlex Brainman <alex.brainman@gmail.com>
Wed, 9 Dec 2015 01:53:57 +0000 (12:53 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Wed, 9 Dec 2015 06:10:46 +0000 (06:10 +0000)
EvalSymlinks code assumes that Join has a bug
(see issue #11551 for details). But issue #11551 has
been fixed. Remove the workaround so it does not
confuses us when we read code next time.

Change-Id: I06bea20189f01f9922237c05516847353d8e4736
Reviewed-on: https://go-review.googlesource.com/17620
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/path/filepath/symlink.go

index 546f93b23777a0e1a09cef12376120f3c21cdfe4..dc7e9eb9bf32e407c958929b69c3c983735704b1 100644 (file)
@@ -59,8 +59,7 @@ func walkLinks(path string, linksWalked *int) (string, error) {
                return newpath, err
        case file == "":
                if isDriveLetter(dir) {
-                       // appending "." to avoid bug in Join (see issue 11551)
-                       return dir + ".", nil
+                       return dir, nil
                }
                if os.IsPathSeparator(dir[len(dir)-1]) {
                        if isRoot(dir) {