SerCeMan / jnr-fuse

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

Update AbstractFuseFS.java #58

Closed rgwood-github closed 6 years ago

rgwood-github commented 6 years ago

add a better error msg

SerCeMan commented 6 years ago

Hey, @rgwood-github!

Thank you for the contribution! Has this happened to you before? There are some checks for this in https://github.com/SerCeMan/jnr-fuse/blob/master/src/main/java/ru/serce/jnrfuse/utils/WinPathUtils.java#L24, so probably this might happen if winfsp was installed but for some reason misconfigured. If winfsp wasn't installed at all, this check should throw an exception https://github.com/SerCeMan/jnr-fuse/blob/master/src/main/java/ru/serce/jnrfuse/utils/WinPathUtils.java#L51.

That said, I agree that it's a good idea to provide a descriptive error messages instead of throwing UnsatisfiedLinkError but it seems to me that the suggested message might be misleading.

SerCeMan commented 6 years ago

I just realised that this change wasn't released yet, I'll release a new jnr-fuse version

rgwood-github commented 6 years ago

Never installed winfs before; the error I received was just a ULError with no error msg. Had to look in the code to see what was wrong. Looking inside the lib code in probably not a good experience for library users.

SerCeMan commented 6 years ago

Hey, @rgwood-github! Sorry, I realised that the code that does a proper lookup for winfsp path wasn't released. It's now published as a part of 0.5.2 - https://bintray.com/serce/maven/jnr-fuse/0.5.2.