Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

nfsmount,serve nfs: introduce symlink support #2975

Nick Craig-Wood4e7ee9310e61
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