winfsp / cgofuse

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

[Windows] Handle missing WinFsp DLL #4

Closed billziss-gh closed 7 years ago

billziss-gh commented 7 years ago

On Windows WinFsp and its API's are acquired dynamically using LoadLibrary and GetProcAddress. How should we handle the situation when it is not installed?

The easiest thing to do from C would be to print a message on stderr and exit. @ncw would this be acceptable for rclone?

Another approach is to somehow panic from within C to give a chance to Go code to recover gracefully. It is not clear at this time how this can be accomplished.

billziss-gh commented 7 years ago

Commits bdd528095aba339eea466248c15cfdef7eb8a0eb and ee096973e0177f5ff49c1d3fe262f0c1c4a81630 fix this.