mirror of
https://github.com/rclone/rclone.git
synced 2026-06-10 17:34:30 -04:00
Previously the Mount RPC ignored the path component of the mount request, so `server:/sub/dir` and `server:/` both landed at the root of the served remote. The Mount handler now cleans the requested path with path.Clean, looks it up in the VFS and serves a billy.Filesystem rooted at that directory, refusing the mount if the path does not exist or is not a plain directory. A pathRewriter cache wraps the inner handle cache so that the same file always produces the same NFS file handle regardless of which mount minted it (and stable across server restarts for the disk and symlink caches). This matches the traditional NFS expectation that a subpath mount behaves like `cd` into a subtree. nfsmount gains a --nfs-mount-path flag (default /) so clients can select a subpath at mount time. This replaces a latent misuse of --volname as the NFS mount path that was previously masked by the server ignoring it. Fixes #9442