summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-15 19:37:02 +0100
committerrfjakob2019-01-15 22:08:20 +0100
commit8a520ee77f4701eb8b94e917d91c22e5398dc11a (patch)
treee182d8b54b91097bd5ad9ff64aaf7fa938523606
parent8f331456511a14d8d936bd4bdc60c4bf587b4d3a (diff)
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
-rw-r--r--mount.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/mount.go b/mount.go
index 5bdaa51..03cbc0b 100644
--- a/mount.go
+++ b/mount.go
@@ -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.