diff options
Diffstat (limited to 'internal/serving')
-rw-r--r-- | internal/serving/disk/symlink/path_test.go | 4 | ||||
-rw-r--r-- | internal/serving/disk/symlink/symlink.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/serving/disk/symlink/path_test.go b/internal/serving/disk/symlink/path_test.go index ef9726c1..66b4fceb 100644 --- a/internal/serving/disk/symlink/path_test.go +++ b/internal/serving/disk/symlink/path_test.go @@ -76,11 +76,11 @@ func testEvalSymlinks(t *testing.T, wd, path, want string) { have, err := symlink.EvalSymlinks(context.Background(), root, path) if err != nil { - t.Errorf("EvalSymlinks(%q) error: %v", path, err) + t.Errorf("evalSymlinks(%q) error: %v", path, err) return } if filepath.Clean(have) != filepath.Clean(want) { - t.Errorf("EvalSymlinks(%q) returns %q, want %q", path, have, want) + t.Errorf("evalSymlinks(%q) returns %q, want %q", path, have, want) } } diff --git a/internal/serving/disk/symlink/symlink.go b/internal/serving/disk/symlink/symlink.go index 3b5d242a..be9a87e0 100644 --- a/internal/serving/disk/symlink/symlink.go +++ b/internal/serving/disk/symlink/symlink.go @@ -59,7 +59,7 @@ func walkSymlinks(ctx context.Context, root vfs.Root, path string) (string, erro } if r >= 0 && r+1 == volLen && os.IsPathSeparator(dest[r]) { - return "", errors.New("EvalSymlinks: cannot backtrack root path") + return "", errors.New("evalSymlinks: cannot backtrack root path") } else if r < volLen || dest[r+1:] == ".." { // Either path has no slashes // (it's empty or just "C:") @@ -102,7 +102,7 @@ func walkSymlinks(ctx context.Context, root vfs.Root, path string) (string, erro linksWalked++ if linksWalked > 255 { - return "", errors.New("EvalSymlinks: too many links") + return "", errors.New("evalSymlinks: too many links") } link, err := root.Readlink(ctx, dest) |