From 4e7ee9310e614a8502a74ed48ad304aa112282f8 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 20 Oct 2024 17:46:42 +0100 Subject: [PATCH] nfsmount,serve nfs: introduce symlink support #2975 --- cmd/serve/nfs/filesystem.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/serve/nfs/filesystem.go b/cmd/serve/nfs/filesystem.go index db918d895..da44bc6f7 100644 --- a/cmd/serve/nfs/filesystem.go +++ b/cmd/serve/nfs/filesystem.go @@ -142,16 +142,16 @@ func (f *FS) Lstat(filename string) (fi os.FileInfo, err error) { return fi, nil } -// Symlink is not supported over NFS +// Symlink creates a link pointing to target func (f *FS) Symlink(target, link string) (err error) { defer log.Trace(target, "link=%q", link)("err=%v", &err) - return os.ErrInvalid + return f.vfs.Symlink(target, link) } -// Readlink is not supported +// Readlink reads the contents of link func (f *FS) Readlink(link string) (result string, err error) { defer log.Trace(link, "")("result=%q, err=%v", &result, &err) - return "", os.ErrInvalid + return f.vfs.Readlink(link) } // Chmod changes the file modes