Closed TriangularIT closed 5 years ago
Investigating this issue leads to the result that the connection to WinFSP is not broken.
IoStatus=c0000034[0]
says, that the object cannot be found.
All you have to do is setting the correct file encoding. Java uses CP1252 as default encoding on Windows which only uses 1 byte per character. The interface in WinFSP expects UTF-8 encoding which is 1-4 bytes per character. This means that there are invalid characters in your path when trying to access the file system.
Simply change the file encoding in the IDE to UTF-8 or use the parameter -Dfile.encoding=UTF-8
when compiling in the commandline. This solves the issues.
Hey, @ab3dat, @TriangularIT! Yes, sorry, I missed the issue initially. It's true, the encoding might need to be explicitly specified on windows, https://github.com/SerCeMan/jnr-fuse/blob/master/INSTALLATION.md#troubleshooting.
We might also need to add some runtime warnings to make sure there is some logging that warns abut the encoding at runtime.
I just now saw that you already pointed to this issue in the troubleshooting section. I mean, I read that sentence quite a few times. Unfortunately the highlighted error service java has failed to start
takes over the focus when reading and one totally ignores the rest of the sentence if you do not have that error.
A runtime warning would be a great solution.
@SerCeMan I implemented a runtime warning now in AbstractFuseFS.java
case WINDOWS:
if (!System.getProperty("file.encoding").equals("UTF-8"))
{
System.out.println("UTF-8 encoding required! Current encoding: " + System.getProperty("file.encoding"));
}
String winFspPath = WinPathUtils.getWinFspPath();
libFuse = loader.load(winFspPath);
break;
In case Windows is detected as platform and the codepage is not UTF-8, a message will be printed in the command line.
Guess that should do it. If you are fine with this fix, I'm going to create a pull request.
Thank you, @ab3dat for your help! It all works – I have missed the warning on the Installation page! :man_facepalming:
When I try to run HelloFuse with the current WinFsp release (2019.2) on a fully updated Win 10 (1809), the drive is shown, but unavailable. The error message says "Location is not available".
I guess that some of WinFsp's headers have moved and are incompatible with the defined structs in
ru.serce.jnrfuse.struct
, but I am far too inexperienced with both libraries to attempt a fix.WinFsp on its own does work – MemFS runs without a hitch and jnr-fuse also works to some extent, because I see some log messages, when I turn on the
debug
-option: