winfsp / cgofuse

Cross-platform FUSE library for Go - Works on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD
https://winfsp.dev
MIT License
511 stars 82 forks source link

macos: look in alternate location for macfuse/osxfuse library #54

Closed ncw closed 3 years ago

ncw commented 3 years ago

With MacFUSE i.e. OSXFuse 4.0, the location of the loadable library has changed to /usr/local/lib/libfuse.2.dylib instead of /usr/local/lib/libosxfuse.2.dylib. The older path is still present for backwards compatibility for the time being.

This patch looks in the newer location first, then in the older location if that fails.

Release Notes: https://github.com/osxfuse/osxfuse/releases/tag/macfuse-4.0.0

Fixes #52

ncw commented 3 years ago

I've fixed the comments :blush:

I must have been having a regression back to C89!

billziss-gh commented 3 years ago

Thank you.

I can confirm that this builds and runs properly on my own Macs, both with older OSXFUSE and newer macFUSE 4.