Skip to content

Commit

Permalink
Fail nicelly on OSXFUSE 3.0.0+
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
  • Loading branch information
Kubuxu committed Dec 5, 2016
1 parent e76b14a commit 53a35a8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fuse/node/mount_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var fuseVersionPkg = "github.com/jbenet/go-fuse-version/fuse-version"
var errStrFuseRequired = `OSXFUSE not found.
OSXFUSE is required to mount, please install it.
NOTE: Version 2.7.2 or higher required; prior versions are known to kernel panic!
NOTE: Version in between 2.7.2 and 3.0.0 is required; prior versions are known to kernel panic!
It is recommended you install it from the OSXFUSE website:
http://osxfuse.github.io/
Expand All @@ -56,6 +56,8 @@ It is recommended you install it from the OSXFUSE website:
For more help, see:
https://github.com/ipfs/go-ipfs/issues/177
OSXFUSE versions >3.0.0 are not compatible with version of FUSE library in current use.
`

var errStrNeedFuseVersion = `unable to check fuse version.
Expand Down Expand Up @@ -142,6 +144,7 @@ func darwinFuseCheckVersion(node *core.IpfsNode) error {
log.Debug("mount: osxfuse version:", ov)

min := semver.MustParse("2.7.2")
max := semver.MustParse("3.0.0")
curr, err := semver.Make(ov)
if err != nil {
return err
Expand All @@ -150,6 +153,10 @@ func darwinFuseCheckVersion(node *core.IpfsNode) error {
if curr.LT(min) {
return fmt.Errorf(errStrUpgradeFuse, ov)
}
// TODO: Upgrade fuse lib and work nice with 3.0.0+
if curr.GE(max) {
return fmt.Errorf(errStrUpgradeFuse, ov)
}
return nil
}

Expand Down

0 comments on commit 53a35a8

Please sign in to comment.