aboutsummaryrefslogtreecommitdiff
path: root/src/path
diff options
context:
space:
mode:
Diffstat (limited to 'src/path')
-rw-r--r--src/path/filepath/symlink_plan9.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path/filepath/symlink_plan9.go b/src/path/filepath/symlink_plan9.go
index 820d150d97..b29abe1dfd 100644
--- a/src/path/filepath/symlink_plan9.go
+++ b/src/path/filepath/symlink_plan9.go
@@ -16,8 +16,8 @@ func evalSymlinks(path string) (string, error) {
// Check validity of path
_, err := os.Lstat(path)
if err != nil {
- // Return the same error value as on other operating systems
- if strings.HasSuffix(err.Error(), "not a directory") {
+ // Return the same error value as on other operating systems.
+ if strings.Contains(err.Error(), "not a directory") {
err = syscall.ENOTDIR
}
return "", err