Comments (7)
Hi, @APayerl!
Thank you for reporting the issue. What do you mean by locating the install path dynamically? I have a limited experience with Windows and unfortunately, don't know any standard approaches for that.
I agree that it's better to check the existence of the file and throw
an exception if it doesn't exist. But please send a PR if you have a better idea of handling such situations.
from jnr-fuse.
I have not thought that much about it so unfortunately I don't have a solution.. but maybe check what driveletters are plugged in atm
File[] roots = File.listRoots();
and check the most probable locations
boolean foundInstall = false;
for(File path : roots) {
newPath = path + "\\Program Files (x86)\\WinFsp\\bin\\winfsp-x64.dll";
if(isPathCorrect(newPath)) {
foundInstall = true;
break;
}
}
Something like that...
Of course it would not be the most effective solution but it would probably be an improvement.
from jnr-fuse.
@APayerl It is possible to set the property called "jnrfuse.winfsp.path" to the correct value?
from jnr-fuse.
Yea well I suppose it should work if WinFsp sets a key(I have no clue if they do)..
If not then a solution like this would work(even though a tad excessive for this purpose):
private File findFile(File start, String goal) {
File file = null;
if(start.isDirectory()) {
for(File f: start.listFiles()) {
file = findFile(f, goal);
if(file != null) {
break;
}
}
} else {
file = start.getName().equals(goal) ? start : null;
}
return file;
}
from jnr-fuse.
@tfiskgul I added the jnrfuse.winfsp.path
property check for that purpose. So that you can provide a winfsp path if it is not standard as a workaround.
@APayerl I don't think that scanning the whole filesystem is a viable solution.
I guess that the best way to implement this is to do a registry lookup, it seems like winfsp uses the Software\\WinFsp
key. Like it's implemented in the cgofuse
, https://github.com/billziss-gh/cgofuse/blob/master/fuse/host.go#L95.
Unfortunately, I won't be able to devote enough time to work on it soon, but I'll be happy to provide as much help as I can if someone wants to send a PR.
from jnr-fuse.
On my machine I found the key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp\InstallDir pointing to the folder where it was installed. Ofcourse this was since I use 64bit Windows.
Have a fix ready but unable to push it. (new to open source contributions)
from jnr-fuse.
Hey, @APayerl! There are some good instructions here, https://opensource.guide/how-to-contribute/#opening-a-pull-request. Also, if you can't for some reasons contribute to github (I know that some companies don't allow this), you can post the code here.
from jnr-fuse.
Related Issues (20)
- Mounting the file system always blocks HOT 2
- How to set `birth_time` in `getattr` HOT 2
- Umount on Mac OS X doesn't work
- Java 9 module support HOT 1
- write throughput very low compared to read HOT 1
- Problem with samba share folders (jnr-fuse + winfsp) HOT 2
- Capturing SetSecurity events HOT 2
- Fix CVE-2014-4043 HOT 4
- Wrong dependency scopes in release 0.5.6 HOT 2
- GraalVM native image support
- Winfsp and jnr-fuse not working HOT 3
- Why not implement the inode interface provided by kernel fuse to replace the current path interface? HOT 5
- Program doesn't shut down properly in some cases on windows
- JVM crash with jnr-fuse and javafx
- WinFsp 1.12 doesn't pass the CI check
- Test failures on AWS Graviton (ARM, aarch64 GNU/Linux)
- Winfsp read callback random offset
- I can't get getxattr() working HOT 1
- -bash: cd : mydirectory: Input/output error HOT 1
- Path Problem with Windows HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jnr-fuse.