diff options
author | Jakob Unterwurzacher | 2018-01-16 22:59:43 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2018-01-16 23:18:53 +0100 |
commit | 7d477d692b68a2be86ec66846fe23b2cfb15d3f0 (patch) | |
tree | 66d825c5c21de7451f7a0f8c3e7abd49dd259402 /mount.go | |
parent | a4dff6aea0b761a49ba3f3b6f25b7442c846afcf (diff) |
MacOS: rely on OSXFuse to create mountpoint below /Volumes
OSXFuse automatically creates the mountpoint if it is
below /Volumes because this would require root permissions
which the user might not have.
Reported at https://github.com/rfjakob/gocryptfs/issues/194
Diffstat (limited to 'mount.go')
-rw-r--r-- | mount.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -58,6 +58,12 @@ func doMount(args *argContainer) int { err = checkDir(args.mountpoint) } else { err = checkDirEmpty(args.mountpoint) + // OSXFuse will create the mountpoint for us if it is below /Volumes/ + if runtime.GOOS == "darwin" && os.IsNotExist(err) && strings.HasPrefix(args.mountpoint, "/Volumes/") { + tlog.Info.Printf("Mountpoint %q does not exist, but should be created by OSXFuse", + args.mountpoint) + err = nil + } } if err != nil { tlog.Fatal.Printf("Invalid mountpoint: %v", err) |