SerCeMan / jnr-fuse

FUSE implementation in Java using Java Native Runtime (JNR)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

anandmohan777 opened this issue · comments

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?

Hey, @anandmohan777! Yes, this is the expected behaviour of winfsp vs FUSE on linux. The behaviour is also reflected in the tests:

protected Path tempPath() throws IOException {
Path tmpDir;
if(Platform.IS_WINDOWS) {
tmpDir = Paths.get("M:\\");
} else {
tmpDir = Files.createTempDirectory("memfuse");
}
return tmpDir;

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