SerCeMan / jnr-fuse

FUSE implementation in Java using Java Native Runtime (JNR)
MIT License
363 stars 86 forks source link

Windows & Ubuntu has different behaviour for mount point in my implementation #101

Closed anandmohan777 closed 4 years ago

anandmohan777 commented 4 years ago

Hi @SerCeMan ,

I have an application(https://github.com/EGA-archive/ega-fuse) using this fuse layer jnr-fuse. I see different behaviour in windows and ubuntu.

Windows:

If the path exists D://home/mount/
The application fails to start and throws error Cannot create WinFsp-FUSE file system: mount point in use.

If the path doesn't exist D://home/mount/path The application starts successfully

Ubuntu:

If the path exists /tmp/mount
The application starts successfully

If the path doesn't exist /tmp/mount/path The application fails to start and throws error fuse: bad mount point /tmp/mount/path: No such file or directory

Could you tell me is this normal for mount point that it should exist for ubuntu, however for windows, the path should not exist to start the fuse application?

SerCeMan commented 4 years ago

Hey, @anandmohan777! Yes, this is the expected behaviour of winfsp vs FUSE on linux. The behaviour is also reflected in the tests: https://github.com/SerCeMan/jnr-fuse/blob/fcbeb641c36156b8ea4da30f48bd44b64a3fd4da/src/main/java/ru/serce/jnrfuse/struct/BaseFsTest.java#L23-L30

I don't have any concrete references to link to but you can probably find them by checking the documentation of fuse and winfsp.