mount: fix fail because of too long volume name - fixes #4026

master
evileye 2020-03-03 21:59:47 +03:00 committed by Nick Craig-Wood
parent fef2c6bf7a
commit 6ff0bb825e
1 changed files with 3 additions and 0 deletions

View File

@ -322,6 +322,9 @@ be copied to the vfs cache before opening with --vfs-cache-mode full.
VolumeName = strings.Replace(VolumeName, ":", " ", -1)
VolumeName = strings.Replace(VolumeName, "/", " ", -1)
VolumeName = strings.TrimSpace(VolumeName)
if runtime.GOOS == "windows" && len(VolumeName) > 32 {
VolumeName = VolumeName[:32]
}
// Start background task if --background is specified
if Daemon {