commit | a5e5beaae13196d49df2bbd2516a6f796ba1ea87 | [log] [tgz] |
---|---|---|
author | Matt Farina <matt@mattfarina.com> | Fri Aug 05 10:24:40 2016 -0400 |
committer | Matt Farina <matt@mattfarina.com> | Fri Aug 05 10:24:40 2016 -0400 |
tree | c88ecaa32dfd2520e958304e242ea6c1f761bd23 | |
parent | 497a9b1f4122f2e971510a69dc43266ad07db969 [diff] |
Fixing case of absolute symlinks Note, for the sake of sharing via VCS absolute symlinks don't tend to work so they should be avoided.
diff --git a/path/path.go b/path/path.go index b939bea..0c3cee1 100644 --- a/path/path.go +++ b/path/path.go
@@ -91,7 +91,11 @@ return gopath, nil } - gopath = filepath.Join(filepath.Dir(gopath), p) + if filepath.IsAbs(p) { + gopath = p + } else { + gopath = filepath.Join(filepath.Dir(gopath), p) + } info, err = os.Lstat(gopath) if err != nil {