Commit 5e829bc7 authored by Mike Gray's avatar Mike Gray

Update mount binary location for Darwin

parent 81de1746
......@@ -34,7 +34,8 @@ func openFUSEDevice() (*os.File, error) {
return nil, fmt.Errorf("all FUSE devices busy")
}
const bin = "/Library/Filesystems/osxfusefs.fs/Support/mount_osxfusefs"
const oldMountBin = "/Library/Filesystems/osxfusefs.fs/Support/mount_osxfusefs"
const newMountBin = "/Library/Filesystems/osxfuse.fs/Contents/Resources/mount_osxfuse"
func mount(mountPoint string, opts *MountOptions, ready chan<- error) (fd int, err error) {
f, err := openFUSEDevice()
......@@ -42,6 +43,11 @@ func mount(mountPoint string, opts *MountOptions, ready chan<- error) (fd int, e
return 0, err
}
bin := oldMountBin
if _, err := os.Stat(newMountBin); err == nil {
bin = newMountBin
}
cmd := exec.Command(bin, "-o", strings.Join(opts.optionsStrings(), ","), "-o", fmt.Sprintf("iosize=%d", opts.MaxWrite), "3", mountPoint)
cmd.ExtraFiles = []*os.File{f}
cmd.Env = append(os.Environ(), "MOUNT_FUSEFS_CALL_BY_LIB=", "MOUNT_OSXFUSE_CALL_BY_LIB=",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment