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

This commit is contained in:
evileye authored and Nick Craig-Wood committed 2020-03-05 13:57:20 +00:00
1 parent fef2c6bf7a
commit 6ff0bb825e
1 file changed
+3
+3
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 {