mount: Replace commas in volume name.

Fixes the following test failure:

    cli_test.go:534: Failed to mount "[...]/542399800,foo,bar" on "[...]/542399800,foo,bar.mnt": exit status 19
This commit is contained in:
Sebastian Lackner 2019-01-15 19:37:02 +01:00 committed by rfjakob
parent 8f33145651
commit 8a520ee77f
1 changed files with 2 additions and 1 deletions

View File

@ -366,7 +366,8 @@ func initGoFuse(fs pathfs.FileSystem, args *argContainer) *fuse.Server {
// Add a volume name if running osxfuse. Otherwise the Finder will show it as
// something like "osxfuse Volume 0 (gocryptfs)".
if runtime.GOOS == "darwin" {
mOpts.Options = append(mOpts.Options, "volname="+path.Base(args.mountpoint))
volname := strings.Replace(path.Base(args.mountpoint), ",", "_", -1)
mOpts.Options = append(mOpts.Options, "volname="+volname)
}
// The kernel enforces read-only operation, we just have to pass "ro".
// Reverse mounts are always read-only.