From 7b8bbe531e0f062254b2d8ffe1e6284cd62309f6 Mon Sep 17 00:00:00 2001 From: nielash Date: Thu, 8 Feb 2024 00:59:13 -0500 Subject: [PATCH] nfsmount: fix --volname being ignored #7503 Before this change, nfsmount ignored the --volname flag. After this change, the -- volname flag is respected, making it possible to set a custom volume name. macOS users should note that Finder will show the correct volume name in most places, but a notable exception is the sidebar, which will show "localhost". This seems to be a system limitation (at least without `sudo`), but see the discussion at https://github.com/rclone/rclone/issues/7503#issuecomment-1933997678 for some possible workarounds. --- cmd/nfsmount/nfsmount.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/nfsmount/nfsmount.go b/cmd/nfsmount/nfsmount.go index 8b9f21b7e..8a1fdea2e 100644 --- a/cmd/nfsmount/nfsmount.go +++ b/cmd/nfsmount/nfsmount.go @@ -70,7 +70,7 @@ func mount(VFS *vfs.VFS, mountpoint string, opt *mountlib.Options) (asyncerrors } cmd = append(cmd, "mount") cmd = append(cmd, options...) - cmd = append(cmd, "localhost:", mountpoint) + cmd = append(cmd, "localhost:"+opt.VolumeName, mountpoint) fs.Debugf(nil, "Running mount command: %q", cmd) out, err := exec.Command(cmd[0], cmd[1:]...).CombinedOutput()