diff options
| author | Alex Brainman <alex.brainman@gmail.com> | 2019-01-05 18:35:27 +1100 |
|---|---|---|
| committer | Alex Brainman <alex.brainman@gmail.com> | 2019-01-10 08:35:34 +0000 |
| commit | 44cf595a7efcd3d7048c745d1d1531696bcb5941 (patch) | |
| tree | 05f200532f0950ece15d871efea5cfb7927dc3c2 /src/path/filepath/symlink.go | |
| parent | 94d9a2045398b471c8aec0b701cad06536e049b3 (diff) | |
| download | go-44cf595a7efcd3d7048c745d1d1531696bcb5941.tar.xz | |
path/filepath: return special error from EvalSymlinks
CL 155597 attempted to fix #29372. But it failed to make all new
test cases pass. Also CL 155597 broke some existing code
(see #29449 for details).
Make small adjustment to CL 155597 that fixes both #29372 and #29449.
Suggested by Ian.
Updates #29372
Fixes #29449
Change-Id: I9777a615514d3f152af5acb65fb1239e696607b6
Reviewed-on: https://go-review.googlesource.com/c/156398
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/path/filepath/symlink.go')
| -rw-r--r-- | src/path/filepath/symlink.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/path/filepath/symlink.go b/src/path/filepath/symlink.go index a08b85a29c..4b41039e25 100644 --- a/src/path/filepath/symlink.go +++ b/src/path/filepath/symlink.go @@ -8,7 +8,6 @@ import ( "errors" "os" "runtime" - "syscall" ) func walkSymlinks(path string) (string, error) { @@ -79,7 +78,7 @@ func walkSymlinks(path string) (string, error) { if fi.Mode()&os.ModeSymlink == 0 { if !fi.Mode().IsDir() && end < len(path) { - return "", syscall.ENOTDIR + return "", slashAfterFilePathError } continue } |
