Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FileSystemHost.Preflight method #48

Open
fgma opened this issue Jul 31, 2020 · 1 comment
Open

Add FileSystemHost.Preflight method #48

fgma opened this issue Jul 31, 2020 · 1 comment

Comments

@fgma
Copy link

fgma commented Jul 31, 2020

A call to mount should not panic when winfsp is not installed but return an error instead. This allows an application to handle this case gracefully.

https://github.com/billziss-gh/cgofuse/blob/45df47debffe20241cb2896905708913408d3152/fuse/host.go#L605-L612

As an alternative you could provide a public function that will allow to check winfsp/fuse availability before calling mount.

@billziss-gh
Copy link
Collaborator

The application may still handle this case by using recover(). In any case this cannot be changed, because the cgofuse interface cannot be changed in a backwards incompatible manner.

As an alternative you could provide a public function that will allow to check winfsp/fuse availability before calling mount.

I agree that having this capability may be worth adding. I will mark it as enhancement.

@billziss-gh billziss-gh changed the title Mount should not panic() but return an error Add FileSystemHost.Preflight method Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants