summaryrefslogtreecommitdiff
path: root/libgo/go/path/filepath/symlink.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/path/filepath/symlink.go')
-rw-r--r--libgo/go/path/filepath/symlink.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/go/path/filepath/symlink.go b/libgo/go/path/filepath/symlink.go
index f627a94ddb9..824aee4e490 100644
--- a/libgo/go/path/filepath/symlink.go
+++ b/libgo/go/path/filepath/symlink.go
@@ -105,8 +105,9 @@ func walkSymlinks(path string) (string, error) {
// directory is a symlink. Stop the walk, if symlink
// target is not absolute path, and return "."
// to the caller (just like unix does).
- if path == "." && !IsAbs(newpath) {
- return ".", nil
+ // Same for "C:.".
+ if path[volumeNameLen(path):] == "." && !IsAbs(newpath) {
+ return path, nil
}
}
if i == linksWalked {