Skip to content

Commit

Permalink
nfsmount: fix --volname being ignored #7503
Browse files Browse the repository at this point in the history
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 #7503 (comment)
for some possible workarounds.
  • Loading branch information
nielash committed Feb 18, 2024
1 parent 0e2f1d6 commit 7b8bbe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/nfsmount/nfsmount.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7b8bbe5

Please sign in to comment.