cmount: fix on Linux - only apply volname for Windows and macOS

This commit is contained in:
Nick Craig-Wood 2018-11-22 20:41:05 +00:00
parent 703b0535a4
commit 84e21ade6b

View file

@ -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")