-
Notifications
You must be signed in to change notification settings - Fork 14
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
Search for lib in java.library.path
instead of hardcoded path
#81
Search for lib in java.library.path
instead of hardcoded path
#81
Conversation
Both Hence we had to ditch this default approach. What we discussed internally: Adding a separate system property, however some Cryptomator distributions (like the AppImage) don't allow to manually override those. Our best option currently is to look in some well-known locations and fallback to |
Some systems create a symlink to the newest version of a library, some not. If we add this last ditch attempt, we need to ensure to use the correct fuse version (by calling fuse_version()) |
The major version (which ensures API-compatibility) is part of the lib name ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just opened cryptomator/jfuse#37 to fallback to the System.loadLibrary
mechanism.
fuse-nio-adapter should not duplicate what Java is already doing. Instead builder.setLibraryPath(...)
is intended to be used to attempt loading from a verified path to an existing .so file.
If no such file could be found in those places, do not set the library path, which will then cause jfuse to fallback to System.loadLibrary(...)
.
In other words: After updating jfuse, we need something like this:
Arrays.stream(LIB_PATHS).map(Path::of).filter(Files::exists).map(Path::toString).findAny().ifPresent(builder::setLibraryPath);
Since there will now be a fallback mecanism in case no element in |
Right! Furthermore we need to remove |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
java.library.path
instead of hardcoded path
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Thank you @nicomem 🙌 |
Resolve #72