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

mount: return ENOSYS rather than EIO on attempted link

Nick Craig-Woodc1a3e363a61d
diff --git a/cmd/mount/dir.go b/cmd/mount/dir.go
index 939935678..3af77e069 100644
--- a/cmd/mount/dir.go
+++ b/cmd/mount/dir.go
@@ -183,3 +183,13 @@ func (d *Dir) Fsync(ctx context.Context, req *fuse.FsyncRequest) (err error) {
}
return nil
}
+
+// Check interface satisfied
+var _ fusefs.NodeLinker = (*Dir)(nil)
+
+// Link creates a new directory entry in the receiver based on an
+// existing Node. Receiver must be a directory.
+func (d *Dir) Link(ctx context.Context, req *fuse.LinkRequest, old fusefs.Node) (new fusefs.Node, err error) {
+ defer log.Trace(d, "req=%v, old=%v", req, old)("new=%v, err=%v", &new, &err)
+ return nil, fuse.ENOSYS
+}