Closed overheadhunter closed 5 years ago
Hey, @overheadhunter!
Thank you for your patience. Looking at osxfuse, removing the check seems reasonable to me. That way, jnr-fuse
will more closely resemble fuse
.
Would you be able to open a PR? If not, I'll try to take a look at this sometime during the next week.
During an attempt to mount, jnr-fuse checks whether the mount point is an existing directory. If it is not, an exception is thrown:
There is already an exception for winfsp:
https://github.com/SerCeMan/jnr-fuse/blob/4b97249333ef360335ed7fe2e7cf46a37f34cfcd/src/main/java/ru/serce/jnrfuse/AbstractFuseFS.java#L254-L259
There are, however, further cases in which it is desirable to mount to a non-existing directory. According to this commit to sshfs FUSE has certain workarounds:
Therefore I kindly request to either disable this check completely (let the software depending on jnr-fuse take care of it) or add an overloaded method, e.g.
public void mount(Path mountPoint, boolean blocking, boolean debug, boolean requireMountPointToExist, String[] fuseOpts)
.Thank you ❤️