From b3704597f3470c03d104d7e8c42bb36e1859933c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 21 Oct 2018 11:05:20 +0100 Subject: [PATCH] cmount: make --volname work for Windows - fixes #2679 --- cmd/cmount/mount.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go index 9aa0b0a71..2a947aa77 100644 --- a/cmd/cmount/mount.go +++ b/cmd/cmount/mount.go @@ -53,7 +53,6 @@ func mountOptions(device string, mountpoint string) (options []string) { // OSX options if runtime.GOOS == "darwin" { - options = append(options, "-o", "volname="+mountlib.VolumeName) if mountlib.NoAppleDouble { options = append(options, "-o", "noappledouble") } @@ -70,6 +69,9 @@ func mountOptions(device string, mountpoint string) (options []string) { options = append(options, "--FileSystemName=rclone") } + if mountlib.VolumeName != "" { + options = append(options, "-o", "volname="+mountlib.VolumeName) + } if mountlib.AllowNonEmpty { options = append(options, "-o", "nonempty") }