From 84e21ade6b7a8acde2e62c9ded0477dc0892b430 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 22 Nov 2018 20:41:05 +0000 Subject: [PATCH] cmount: fix on Linux - only apply volname for Windows and macOS --- cmd/cmount/mount.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go index 2a947aa77..3bb26ebe2 100644 --- a/cmd/cmount/mount.go +++ b/cmd/cmount/mount.go @@ -69,8 +69,10 @@ func mountOptions(device string, mountpoint string) (options []string) { options = append(options, "--FileSystemName=rclone") } - if mountlib.VolumeName != "" { - options = append(options, "-o", "volname="+mountlib.VolumeName) + if runtime.GOOS == "darwin" || runtime.GOOS == "windows" { + if mountlib.VolumeName != "" { + options = append(options, "-o", "volname="+mountlib.VolumeName) + } } if mountlib.AllowNonEmpty { options = append(options, "-o", "nonempty")